Bug #1766 Incorrect values returned from UNIX_TIMESTAMP()

Submitted: 6 Nov 2003 7:38 Modified: 13 Dec 2003 11:43
Reporter: [ name withheld ] Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:4.0.13-log OS:Linux (Debian Linux Kernel 2.4.20)
Assigned to: Ramil Kalimullin CPU Architecture:Any

[6 Nov 2003 7:38] [ name withheld ]
Description:
I've noticed that mysql sometimes returns UNIX_TIMESTAMP()s incorrectly.  Case in point.  When doing the following:

SELECT UNIX_TIMESTAMP('2003-10-12 09:00:00'), I get the value 1065963600.  This value should be 1065967200.  I don't know that I've found any other situations where this value is incorrectly returned.

How to repeat:
SELECT UNIX_TIMESTAMP('2003-10-12 09:00:00');
[11 Nov 2003 23:47] Ramil Kalimullin
what's your server timezone variable value?
[13 Dec 2003 11:43] Michael Widenius
As Ramil pointed out;  The value of unix_timestamp() depends on the value of the timezone variable.  You can check this with:

show variables like "%timezone%";

For more information, please consult the MySQL manual.

Regards,
Monty

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.049 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.