strtotime глюк.

WP

^_^
strtotime глюк.

Потребовалось получить timestamp для 00:00 сегодняшнего дня. Сделал strtotime('today').
На локальной машине (PHP/5.1.4 win32) нижеследующий код:
PHP:
echo strtotime('today')."\n";
sleep(1);
echo strtotime('today');
дает всё правильно: "327358800 327358800".
Закачал на сервер PHP/4.4.2 FreeBSD 6.0 выдало "1147862813 1147862814". Т.е. time().
С чем это может быть связанно? Какой способ избрать чтобы работало везде?
Спасибо.
 

McSimm

Новичок
по теме, наверное strtotime("today 00:00:00"), хотя я не уверен, что правильно понял вопрос
 

Leksi

Новичок
The strings `now' or `today' are relative items corresponding to zero-valued time displacement, these strings come from the fact a zero-valued time displacement represents the current time when not otherwise changed by previous items. They may be used to stress other items, like in `12:00 today'. The string `this' also has the meaning of a zero-valued time displacement, but is preferred in date strings like `this thursday'.
 

WP

^_^
McSimm
Спасибо, всё правильно. Странно что так работает, а просто 'today' нет.
 
Сверху