> I've searched around the website and in the mailing-list archives, but I
> didn't find the answer to this simple question:
>
> What's the max capacity of the DateTime object ? I know that some date times
> implementations suffer from a date time limit at about 2030...
>
> Maybe this question could be added to the FAQ, or at least a piece of code
> that can give the information if it depends on the underlying OS.

The bottleneck won't be DateTime, with that said, calculating dates
into the future without compiled TZ's is known to be a huge
bottleneck; and, unfortunately compiled timezones only go like 30
years into the future.

$ perl -MDateTime -E'say DateTime->new(year => 500_000, day => 29, month => 2)';
500000-02-29T00:00:00

$ perl -MDateTime -E'say DateTime->new(year => 500_000, day => 29,
month => 2, time_zone => q[local] )';
## Not going anywhere soon....

localtime() is still typically going to be limited by the OS's int size.

-- 
Evan Carroll
System Lord of the Internets
http://www.evancarroll.com

Reply via email to