NetBSD-Bugs archive

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

lib/49180: date -r cuts off a few seconds early

>Number:         49180
>Category:       lib
>Synopsis:       date -r cuts off a few seconds early
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Sep 07 12:05:01 +0000 2014
>Originator:     Martin Husemann
>Release:        NetBSD 7.99.1
The NetBSD Foundation, Inc.
System: NetBSD 7.99.1 NetBSD 7.99.1 (NIGHT-OWL) #284: Sat 
Sep 6 16:39:24 CEST 2014
Architecture: x86_64
Machine: amd64
Trying to print out the UTC date of the last seconds representable with
our 64 bit signed time_t fails.

Try: date -u -r 922337206854775806
and watch: date: 922337206854775806: localtime: Value too large to be stored in 
data type
(which is incorrect, it is: 0x7ffffffffffffffe)

Strangely a simple C program doing the same strtoll() call seems to work
fine for me.


Home | Main Index | Thread Index | Old Index