Rant: Date and Time fall short of simplicity in D
Kagamin
spam at here.lot
Sun Mar 31 04:53:06 PDT 2013
On Sunday, 31 March 2013 at 02:39:48 UTC, Steven Schveighoffer
wrote:
>> And
>> if future-proofing is the issue, then you'll need a 64-bit
>> system anyway,
>> otherwise the C stuff that you're interacting with wouldn't
>> work correctly with
>> the larger time_t values.
>
> What C stuff am I interacting with? Unix Time <=> SysTime
> conversions are purely D code.
>
> It won't be very long until Unix will have to tackle this
> (hopefully they don't wait until 2037). The most likely
> scenario is they just increase the bits for time_t to 64. D
> will be more ready for that with a change to long/ulong for
> unixTimeToSysTime.
Or they may treat it heuristically. C standard says that time_t
is implementation defined, so if you want to know which time it
represents, you should use gmtime function which converts it to
broken down form - year, month etc.
More information about the Digitalmars-d
mailing list