[Pdx-pm] 2038 patch for perl

Michael G Schwern schwern at pobox.com
Fri Sep 12 14:20:44 PDT 2008

Jonathan Leto wrote:
> Howdy,
> Great work! I read through it and it seems that you had some nasty
> edge cases to deal with.
> I was wondering, is there a reason that you took "use integer" out of
> Time::Local and instead used int() in a few places? Was this for
> performance or unintentional?

"use integer" means scalar numbers are only ever stored as SvIV's which are C
integers, they won't upgrade to an SvNV (float).  That means 32 bits.  That
means you can't store a 64 bit time_t.

Come to think of it, it's odd that SvIV's upgrade to float not to a 64 bit int
first, which can hold more.

More information about the Pdx-pm-list mailing list