petdance/scratch — Issue #753: avoid 2038 bug
Author: petdance
Created: 2011-11-14 06:13:24+00:00
State: open
Labels: core, Pri-minor, Sev-medium, todo

Original reported here: http://rt.perl.org/rt3/Ticket/Display.html?id=57728
```
>> we definitely need date/time pmc(s?) not only to have a common epoch
>> across platforms, but to deal with 2038. in particular, we should
>> leverage schwern's work on perl to address the 2038 bug.
>> ~jerry
>
> We definitely haven't already fixed this. Here's an easy test using
> libfaketime:
>
> $ cat time.pir
> .sub main :main
> .local int time_int
> time time_int
> say time_int
> .end
> $ ./parrot time.pir
> 1222213121
> $ LD_PRELOAD=/usr/src/libfaketime-0.8/libfaketime.so.1 FAKETIME="+40y"
> ./parrot time.pir
> -1811314167

We can't make this example work. If you use an INTVAL, and the INTVAL
can be signed 32 bits, there is no way to have a more than 31 bits
unsigned stored on it as such.

--
Salu2
```

Since this is unlikely to get resolved shortly and only has a small amount of history, moving tracking of issue here.

Originally http://trac.parrot.org/parrot/ticket/505 by @coke