SQL Server clock seems to be wrong...

Status
Not open for further replies.

dark_fire

New Member
Messages
10
Reaction score
0
Points
0
Hi,

I've trying to figure out why SELECT UTC_TIMESTAMP(); was giving me +10 UTC instead of UTC.

So I ran the following query:
SELECT @@system_time_zone, NOW(), UTC_TIMESTAMP();

Which gave me the following output:
@@system_time_zone
CST

NOW()
2010-02-19 01:35:30

UTC_TIMESTAMP()
2010-02-19 07:35:30

Now it claims to be CST, however the current time in CST is:
2010-02-18 11:35:30

Which means that in order to convert to UTC, because it thinks the timezone is CST, it add 6 hours, while in actual fact it's already 8 hours ahead...

Not sure if this is something I can change on my side?
 
Last edited:

lemon-tree

x10 Minion
Community Support
Messages
1,420
Reaction score
46
Points
48
I noticed the same thing the other day. PHP time on the hosting servers is set to a different time to that of the the SQL server. I noticed when it says I made posts on my site in the future, which certainly is confusing.
 

Anna

I am just me
Staff member
Messages
11,751
Reaction score
581
Points
113
Since this has been resolved, I'll close this thread.
 
Status
Not open for further replies.
Top