Date: Wed, 16 May 2001 16:00:28 +1200 From: Jonathan Chen <jonathan.chen@itouch.co.nz> To: Crist Clark <crist.clark@globalstar.com> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: mktime(3) Bug? Message-ID: <20010516160028.A23996@itouchnz.itouch> In-Reply-To: <3B01CD18.6E725786@globalstar.com>; from crist.clark@globalstar.com on Tue, May 15, 2001 at 05:43:04PM -0700 References: <3B01CD18.6E725786@globalstar.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, May 15, 2001 at 05:43:04PM -0700, Crist Clark wrote:
[...]
> At first I thought it might be a conversion-only problem, but you get
> the same thing if you _set_ the time across a DST boundary. Looking at
> the date(1) code and reviewing the manpages, my best guess is that
> mktime(3) uses the _current_ DST settings when setting the "target"
> time.
>
> That would explain the behavior. And that, IMHO, is a bug. When a
> user types that second command, he expects to see midnight on the
> 1st, not 11 PM on the 31st. The DST of the "target" time should be
> used by mktime(3), not the current one. This is especially true if
> the user were setting the time rather than just displaying it.
>
> This is a bug, right?
Yes. I'd agree with you there. The current situation would lead to
the possibility of displaying non-existing times (ie those in the
changeover periods).
Cheers.
--
Jonathan Chen <jonathan.chen@itouch.co.nz>
----------------------------------------------------------------------
Opportunities are seldom labeled
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010516160028.A23996>
