[FLOW3-general] DateTime limited to Unix timestamp?
Michael Sauter
mail at michaelsauter.net
Fri Jul 2 22:59:25 CEST 2010
On 02.07.10 10:42, Jigal van Hemert wrote:
> Michael Sauter wrote:
>> On 01.07.10 21:12, Jigal van Hemert wrote:
>>> Thinking that a system will be replaced in x years is something that was
>>> proven wrong a little over a decade ago.
>> True :) But the case is a bit different here I think. The problem with
>> Y2K was that the stored values were not sufficient. Here, not the
>> value is the problem, but the possible range ...
>
> I see no difference:
> - then: year stored in two decimal digits, now: seconds since "0" stored
> in 32 binary digits
> - then: range limited to 00-99, now: range limited to –2147483648 -
> 2147483647
>
> The storage format is a bit different, but the problem is the same.
> Timestamps beyond 2038-01-19 would be stored in large, negative numbers
> and that would represent dates in 1901. Just like years after '99 would
> wrap around to '00, representing 1900...
Storing a year as "07" is ambiguous right from the start, storing
seconds since 1970 is always the same, no matter how big the range is.
Year 2038 is still a problem with 32-bit numbers, though. So I guess if
there's a better solution, let's choose it ;)
~michael
More information about the FLOW3-general
mailing list