needs_upgrade Posted June 13, 2011 Share Posted June 13, 2011 Good day to you guys! The mysql function NOW() selects the date and time of server. What if the server is in the USA, how can i get the date and time here in GMT + 8:00? Thank you very much. Link to comment https://forums.phpfreaks.com/topic/239201-getting-the-local-time-of-location-not-the-servers-local-time/ Share on other sites More sharing options...
PFMaBiSmAd Posted June 13, 2011 Share Posted June 13, 2011 Mysql has its own time zone setting - http://dev.mysql.com/doc/refman/5.0/en/time-zone-support.html If it is not your own mysql server, you will be limited to using the Per-connection time zone choice and execute a SET time_zone = timezone query once you have established a connection to the database server. Link to comment https://forums.phpfreaks.com/topic/239201-getting-the-local-time-of-location-not-the-servers-local-time/#findComment-1228927 Share on other sites More sharing options...
needs_upgrade Posted June 13, 2011 Author Share Posted June 13, 2011 Thanks! Link to comment https://forums.phpfreaks.com/topic/239201-getting-the-local-time-of-location-not-the-servers-local-time/#findComment-1228933 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.