Closed olimsaidov closed 10 years ago
Hi guys,
would you be able to elaborate this a bit more?
AFAIK time() always returns a timestamp that is timezone independent (number of seconds since the Unix Epoch: January 1 1970 00:00:00 GMT) - which is what $created should be as well when generating the digest...
Thanks in advance for your feedback!
Kind regards, David
Hi guys,
any news on this issue?
Thanks in advance for your feedback! David
It surely is. time() function is timezone independent. But strtotime() while converting uses default timezone set in php.ini or value explicitly set by date_default_timezone_set(). Hence there is a bug comparing two timestamps.
Thanks for the additional information @olimsaidov. Unfortunately I'm still not 100% sure there is an issue as...
int strtotime ( string $time [, int $now = time() ] )
The function expects to be given a string containing an English date format and will try to parse that format into a Unix timestamp (the number of seconds since January 1 1970 00:00:00 UTC)
As far as I'm aware it's then comparing epoch with epoch, which shouldn't be a problem... Thanks in advance for your feedback!
Kind regards, David
Thanks for your contribution @olimsaidov (and especially for your patience and the additional info! :-) )
There is bug in token expire validation when timezone is not GMT. This should fix it.