If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > UNIX_TIMESTAMP() has 1 hour delay

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-15-09, 07:34
bono56 bono56 is offline
Registered User
 
Join Date: May 2004
Posts: 133
UNIX_TIMESTAMP() has 1 hour delay

i am working on a server that time had set to local time.
when i type "SELECT UNIX_TIMESTAMP(),curdate();" , the curtime shows the right local time, but unix_timestamp shows 1 hour delay in GMT time.
i think something on the server set false.
anyone can help?
Reply With Quote
  #2 (permalink)  
Old 07-16-09, 16:03
alexsqlforums alexsqlforums is offline
Registered User
 
Join Date: Jan 2009
Location: NYC
Posts: 11
I think UNIX_TIMESTAMP will return negative numbers for some
times in timezones with a positive offset from GMT

so you can use

[mysqld_safe]
timezone = America/Los_Angeles

Last edited by alexsqlforums; 07-16-09 at 16:08.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On