[erlang-patches] Fix calendar:local_time_to_universal_time_dst/2 bug of return value -1 from mktime

Kenji Rikitake kenji.rikitake@REDACTED
Thu Feb 11 09:25:18 CET 2010


I'll keep this terse:

In the message <6672d0161002102238w7a62fa55gbf1d62758674b371@REDACTED>
dated Thu, Feb 11, 2010 at 07:37:55AM +0100,
Björn Gustavsson <bgustavsson@REDACTED> writes:
> 2010/2/11 Kenji Rikitake <kenji.rikitake@REDACTED>:
> > I would like the mktime fix of erl_time_sup.c to be included ASAP.
> 
> I will include a fix in a new branch in pu and unless it causes any
> problems in our daily builds (unlikely), it will be included in R13B04.
> See the end of the email for the fix and my description of it.

The patch is confirmed and I have no objection.

> >> The documentation says that local_time_to_universal_time_dst/1
> >> returns an empty list for a time that does not exist. We don't want
> >> the same return value for a valid time that cannot be handled because
> >> of an implementation detail.
> >
> > I will not argue against this decision for the time being.
> 
> We may change our minds if the patch is to be included in
> a major release (such as R14, where some incompatibilities
> are allowed) and the patch is ready in good time before the
> release so we don't have to rush the review. I agree that calendar
> will need some sort of update to properly handle badargs from
> local_time_to_universal_time().

I'd be glad if Erlang/OTP team will review the semantics of
local_time_to_universal_time() again before R14.

> Here is my suggested patch (which will soon be included in pu):
> 
> Subject: [PATCH] erl_time_sup.c: test for error return from mktime()

Patch confirmed.

(rest deleted)

Regards,
Kenji Rikitake


More information about the erlang-patches mailing list