bug in inets or erlang!

Ulf Wiger (AL/EAB) <>
Wed Nov 30 10:07:10 CET 2005


I agree that, given the type of input argument, it's
not obvious why this function should stop working 
before some arbitrary point in time - if it's not 
the beginning of time, but I assume that would be
{{0,0,0},{0,0,0}}.

OTOH, Coordinated Universal Time (UTC) didn't 
exist before 1972, so what would be a correct 
return value before then?

Also time zones haven't always looked the same.
The U.S. introduced four time zones on Nov. 18,
1883. So chances are that any conversion from 
UTC to localtime given very old dates would have
to operate on timezone definitions that didn't 
exist at the time. What, then, is the significance
of the result?

/Uffe 

> -----Original Message-----
> From:  
> [mailto:] On Behalf Of Peter Lund
> Sent: den 30 november 2005 09:46
> To: Claes Wikstrom
> Cc: Peter Lund; ; 
> Subject: Re: bug in inets or erlang!
> 
> Good you have an opionion. Please enlight us!
> 
> I think it is a bug! There is no real reason why this tiny 
> function should be causing crashes even if the caller asks 
> for a valid time and date, any year in the past, for instance 
> the birth of planet earth year some -6 billion or something...
> 
> /Peter
> 
> Claes Wikstrom wrote:
> 
> > Peter Lund wrote:
> >
> >> Yes, the important question here is if:
> >>
> >>  erlang:universaltime_to_localtime({{1969,12,31},{23,59,59}}).
> >>
> >> really should crash the code just because it is 1 sec too early? 
> >> No-one seems to have any opinion about it!
> >>
> >
> > I do :-)
> >
> > /klacke
> >
> 
> 
> 



More information about the erlang-questions mailing list