john smith 1924 Veteran Posted April 20, 2003 Veteran Share Posted April 20, 2003 Ok - so after sniffing about php.net i came up with this date script which formats the date to GMT; i have a problem that as the server is in the USA the times are wrong in php scripts. <?PHP $timestamp=(gmstrftime("%b %d %Y %H:%M:%S",time())); echo $timestamp; ?> however.... :) this script doesnt take into account GMT Daylight savings :). How would i add on 1 hour? thanks./ Link to comment Share on other sites More sharing options...
0 pringlex Posted April 20, 2003 Share Posted April 20, 2003 <?PHP $timestamp=(gmstrftime("%b %d %Y %H:%M:%S",time()+3600)); echo $timestamp; ?> Give that a try :) Link to comment Share on other sites More sharing options...
Question
john smith 1924 Veteran
Ok - so after sniffing about php.net i came up with this date script which formats the date to GMT; i have a problem that as the server is in the USA the times are wrong in php scripts.
<?PHP $timestamp=(gmstrftime("%b %d %Y %H:%M:%S",time())); echo $timestamp; ?>however.... :) this script doesnt take into account GMT Daylight savings :). How would i add on 1 hour?
thanks./
Link to comment
Share on other sites
1 answer to this question
Recommended Posts