Bug #36339 timestamp documentation issue
Submitted: 25 Apr 2008 11:06 Modified: 28 May 2008 16:33
Reporter: Peter Laursen (Basic Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:4.1+ OS:Any
Assigned to: Paul DuBois CPU Architecture:Any
Tags: qc

[25 Apr 2008 11:06] Peter Laursen
Description:
This 
http://bugs.mysql.com/36214
was closed as 'not a bug'

But the documentation issues raised by me were not considered!

quote:

http://dev.mysql.com/doc/refman/5.0/en/timestamp.html:
"TIMESTAMP values are converted from the current time zone to UTC for
storage, and converted back from UTC to the current time zone for
retrieval."

http://dev.mysql.com/doc/refman/5.0/en/datetime.html:
"For example, TIMESTAMP values cannot be earlier than 1970 or later
than 2038."

1) 
I think first document needs a clarification (at the top) that

"The TIMESTAMP ... supported range is  '1070-01-01 00:00:00' to
'2037-12-31 23:59:59' UTC. "

similar to and close to

"The DATETIME ... supported range is '1000-01-01 00:00:00' to
'9999-12-31 23:59:59'."

"earlier than 1970 or later than 2038" is not as EXACT as "range is '1000-01-01 00:00:00' to '9999-12-31 23:59:59'."  The range for boht should be documented using the format to the TYPE itself. And they should be in the same page!

2)
and I believe this is wrong "... later than 2038".  It is *later than 2037*
I believe (but it is better use to the TIMESTAMP format itself like '2037-01-01 23:59:59' in the documetation)!  Inserting '2038-05-31 23:59:59' (what is *later than 2037* but not *later than 2038*) fails and inserting '2037-05-31 23:59:59' succeeds.

How to repeat:
see above

Suggested fix:
see above
[25 Apr 2008 11:33] Valeriy Kravchuk
Thank you for the documentation request.
[25 Apr 2008 11:50] Peter Laursen
Actually I do not think the range for a DATE is documented either ..
[28 May 2008 16:33] Paul DuBois
The end of the TIMESTAMP range is '2038-01-19 03:14:07'. Will update the docs accordingly.

The DATE range is given in both of these places:
http://dev.mysql.com/doc/refman/5.0/en/date-and-time-type-overview.html
http://dev.mysql.com/doc/refman/5.0/en/datetime.html
[28 May 2008 16:33] Paul DuBois
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant products.