godsent Posted January 11, 2010 Share Posted January 11, 2010 I found this code to get current date with timezone, but the problem is that this returns my current computer date, for example if I set computer date to 2001, echo $date, gives me that today is 2001. $timezone = 2; $date = gmdate("Y/m/j H:i:s", time() + 3600*($timezone+date("I"))); Possible option that is because my computer is my host? Link to comment https://forums.phpfreaks.com/topic/188067-getdate-returns-computer-date-not-the-current-date/ Share on other sites More sharing options...
cags Posted January 11, 2010 Share Posted January 11, 2010 It will give you the time based on the time reported by the server, since your testing on localhost it will use the time of your computer. Link to comment https://forums.phpfreaks.com/topic/188067-getdate-returns-computer-date-not-the-current-date/#findComment-992862 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.