Crash in calendar:local_time_to_universal_time_dst/1

Administratör hakan.stenholm@REDACTED
Wed Dec 15 13:51:00 CET 2004


I'm currently working with the 'calendar' OTP module, to handle dates  
and time values of the iCal (RFC 2445) / CPL standards (RFC 3880).

A call  
"calendar:local_time_to_universal_time_dst({{2004,3,28},{2,0,0}})",  
crashes on my Mac but not on a RedHat Linux machine I tested on.
The return value expected is = [] - assuming that both use DST  
(Daylight Saving Time) according to the current EU standard.
This works on the Linux machine, but not the Mac, other legal dates  
like 2004-03-28 01:59:59 and 2004-03-28 03:00:00 work without problems  
and return the expected results.

The crash:

MacOSX 10.3.6

95> calendar:local_time_to_universal_time_dst({{2004,3,28},{2,0,0}}).

=ERROR REPORT==== 15-Dec-2004::13:22:41 ===
Error in process <0.85.0> with exit value:  
{badarg,[{erlang,universaltime_to_localtime,[{{1969,12,31},{23,59,59}}]} 
,{calendar,local_time_to_universal_time_dst,1},{erl_eval,do_apply,5},{sh 
ell,exprs,6},{shell,eval_loop,3}]}

** exited: {badarg,[{erlang,universaltime_to_localtime,
                             [{{1969,12,31},{23,59,59}}]},
                     {calendar,local_time_to_universal_time_dst,1},
                     {erl_eval,do_apply,5},
                     {shell,exprs,6},
                     {shell,eval_loop,3}]} **


----------------
Red Hat Linux release 7.3

1> calendar:local_time_to_universal_time_dst({{2004,3,28},{2,0,0}}).
[]




More information about the erlang-questions mailing list