Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old January 16th, 2007, 09:15 AM
Christoph Burschka
Guest
 
Posts: n/a
Default strtotime and a very mysterious date

Namely the thirteenth of December 1901, 12:45:52, Pacific Time.

All dates later than this passed in format "yyyy-mm-dd hh:mm:ss" to the
strtotime function return the correct unix timestamp value (as can be
verified by passing it back to date()).

If a date earlier than 1901-12-13 12:45:52 is used, it returns an error.
I tried this for a while to find the exact cut-off point, and this is it.

Any reason - possibly a limitation of the integer value that is used? I
didn't find this documented anywhere...

--
Christoph Burschka
  #2  
Old January 16th, 2007, 09:25 AM
Christoph Burschka
Guest
 
Posts: n/a
Default Re: strtotime and a very mysterious date

Christoph Burschka schrieb:
Quote:
Namely the thirteenth of December 1901, 12:45:52, Pacific Time.
>
All dates later than this passed in format "yyyy-mm-dd hh:mm:ss" to the
strtotime function return the correct unix timestamp value (as can be
verified by passing it back to date()).
>
If a date earlier than 1901-12-13 12:45:52 is used, it returns an error.
I tried this for a while to find the exact cut-off point, and this is it.
>
Any reason - possibly a limitation of the integer value that is used? I
didn't find this documented anywhere...
>
--
Christoph Burschka
Whoops, I should have checked more closely. In fact this *is* documented
as the minimal value of most dates due to the length of the 32-bit integer.

I never considered that these "Y2K" problems work backwards, too...

--
Christoph Burschka
  #3  
Old January 16th, 2007, 08:15 PM
Tim Roberts
Guest
 
Posts: n/a
Default Re: strtotime and a very mysterious date

Christoph Burschka <christoph.burschka@rwth-aachen.dewrote:
Quote:
>Christoph Burschka schrieb:
Quote:
>Namely the thirteenth of December 1901, 12:45:52, Pacific Time.
>>
>All dates later than this passed in format "yyyy-mm-dd hh:mm:ss" to the
>strtotime function return the correct unix timestamp value (as can be
>verified by passing it back to date()).
>>
>If a date earlier than 1901-12-13 12:45:52 is used, it returns an error.
>I tried this for a while to find the exact cut-off point, and this is it.
>>
>Any reason - possibly a limitation of the integer value that is used? I
>didn't find this documented anywhere...
>
>Whoops, I should have checked more closely. In fact this *is* documented
>as the minimal value of most dates due to the length of the 32-bit integer.
>
>I never considered that these "Y2K" problems work backwards, too...
The upper end of this range is coming up as well, in the middle of
February, 2038.
--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.
  #4  
Old January 16th, 2007, 08:15 PM
Rik
Guest
 
Posts: n/a
Default Re: strtotime and a very mysterious date

Tim Roberts wrote:
Quote:
Christoph Burschka <christoph.burschka@rwth-aachen.dewrote:
>
Quote:
>Christoph Burschka schrieb:
Quote:
>>Namely the thirteenth of December 1901, 12:45:52, Pacific Time.
>>>
>>All dates later than this passed in format "yyyy-mm-dd hh:mm:ss" to
>>the strtotime function return the correct unix timestamp value (as
>>can be verified by passing it back to date()).
>>>
>>If a date earlier than 1901-12-13 12:45:52 is used, it returns an
>>error. I tried this for a while to find the exact cut-off point,
>>and this is it.
>>>
>>Any reason - possibly a limitation of the integer value that is
>>used? I didn't find this documented anywhere...
>>
>Whoops, I should have checked more closely. In fact this *is*
>documented as the minimal value of most dates due to the length of
>the 32-bit integer.
>>
>I never considered that these "Y2K" problems work backwards, too...
>
The upper end of this range is coming up as well, in the middle of
February, 2038.
And that's sooner a problem then you think. What if you want to calculate
new mortgages? That's a field where 2038 is very, very close...
--
Rik Wasmus


 

Bookmarks

Thread Tools

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles