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. Quote 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. Quote 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! Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.