Jump to content

MySQL now()


complex05

Recommended Posts

Is there an easy way to adjust the time for MySQL on a shared server? I could manually write into my scripts to use date(mktime()) but that would require too much work. When I enter a row, I use the now() function to timestamp the row... but since we've gone live on our shared server, we noticed that the server time is 3 hours behind ours.

Is there any easy solution?? Please give me good news :)
Link to comment
https://forums.phpfreaks.com/topic/6494-mysql-now/
Share on other sites

[!--quoteo(post=361325:date=Apr 3 2006, 03:53 PM:name=toplay)--][div class=\'quotetop\']QUOTE(toplay @ Apr 3 2006, 03:53 PM) [snapback]361325[/snapback][/div][div class=\'quotemain\'][!--quotec--]
You always write dates and times with whatever the server date and time is. Then when you go to display it, you subtract or add hours as needed.

That's why this forum has a feature where it asks you what time zone you're in.
[/quote]

Is there a way to change my timezone with .htaccess or something? I know I can't change the server's time...
Link to comment
https://forums.phpfreaks.com/topic/6494-mysql-now/#findComment-23611
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.