3
I think server time and php time are not the same. I live in Portugal so I set my zone time to GMT+0. For time show correctly in my comment posts etc I have to set server time to GMT -5.
However, when using getDate(time()) the return value is not based in this server time(GMT-5), it returns something like GMT-8.
So server time is not equal to php time.
If I had something like
putenv ('TZ=Europe/Lisbon');
then the formdatetime.php return the correct date for me!
This means that before using getDate() or other date functions, we must set a correct time zone for our php.
putenv() requires safe mode. There an alternative function for php 5:
http://php.net/manual/pt_BR/function.date-default-timezone-set.phpAm I missing something?