| | |||||||
| |||||||
| |||||||
|
|
|
|
|
|
|
If your server and your location is not on the same time zone then your timestamp would be on the server zone. Here is how to get your own GMT instead of Server's GMT By : hermawan /** * Function mytime * @desc Get timestamp for needed GMT * @author Hermawan Haryanto * @date June 14, 2004 - 23:10 * @input * gmt String, Needed GMT * @output * timestamp * @sample * mytime('+7'); */ function mytime ($gmt = '') { if ($gmt == '' && strlen ($gmt) <= 0) { $rtn = time(); } else { $gmdates = explode ('|', gmdate('H|i|s|m|d|Y')); $rtn = mktime ( $gmdates[0]+$gmt, $gmdates[1], $gmdates[2], $gmdates[3], $gmdates[4], $gmdates[5] ); } return $rtn; }
More Date Time Code Articles |
| |
| |