[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: bug in ctime()?



Benedikt Eric Heinen writes:

>   I suppose I found a bug in libc (V5.2.18 - don't have a newer version
> around, maybe someone else can check the newer version), but according to
> the ctime man page the following source yields a wrong result:
> 
[... ctime(0) ...]
>
> The result for this is:
> 
> Thu Jan  1 01:00:00 1970
> 
> Shouldn't the correct result be 'Thu Jan  1 00:00:00 1970' (one hour
> earlier)?

If you were living one time zone to the west of where you are, yes. The output
of ctime() is localized for your current time zone, and since the date on your
message indicates you are +0100 (MET), I think the output of ctime() is
correct.

-- 
Robert Leslie
rob@mars.org


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-REQUEST@lists.debian.org . Trouble? e-mail to Bruce@Pixar.com


Reply to: