Jump to content
Updating IPB tonight Read more... ×

Archived

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

johnnyk

MySQL NOW()

Recommended Posts

Does NOW() in MySQL change according to daylight savings?
If it does, should I use ... INTERVAL + 5 + date(I)?

Also, what's the correct way to add an interval in MySQL?
Now() + INTERVAL 5
or
DATE_ADD(NOW(), INTERVAL 5 HOURS)

Share this post


Link to post
Share on other sites
not sure about DST, but the correct syntax is:

DATE_ADD(NOW(), INTERVAL 5 HOUR)

the interval type needs to be singular, which has always tripped me up.

Share this post


Link to post
Share on other sites
This would depend upon the servers OS setting I would think.

Share this post


Link to post
Share on other sites
[!--quoteo(post=386692:date=Jun 21 2006, 09:51 PM:name=thorpe)--][div class=\'quotetop\']QUOTE(thorpe @ Jun 21 2006, 09:51 PM) [snapback]386692[/snapback][/div][div class=\'quotemain\'][!--quotec--]
This would depend upon the servers OS setting I would think.
[/quote]
Is there a way to find out if my server uses DST on MySQL without waiting until the fall? My host outsources and asking them won't solve anything.

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.