Jump to content

Archived

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

complex05

MySQL now()

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 :)

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
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...

Share this post


Link to post
Share on other sites

×

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.