NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bin/40425: mktime(3) returns wrong value
>Number: 40425
>Category: bin
>Synopsis: mktime(3) returns wrong value
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Jan 18 03:55:00 +0000 2009
>Originator: Takahiro Kambe
>Release: NetBSD 5.99.7
>Organization:
Takahiro Kambe
>Environment:
System: NetBSD reef.back-street.net 5.99.7 NetBSD 5.99.7 (CF-R) #180: Sat Jan
17 23:51:44 JST 2009
taca%reef.back-street.net@localhost:/var/obj/sys/arch/i386/compile/CF-R i386
Architecture: i386
Machine: i386
>Description:
mktime(3) returns strange value after christos-time_t was merged.
>How-To-Repeat:
Here is a reproducable code fragment and tested on i386.
#include <stdio.h>
#include <time.h>
main()
{
time_t t;
struct tm *tm;
char buf[BUFSIZ];
time(&t);
printf("%lld\n", t);
tm = localtime(&t);
t = mktime(tm);
printf("%lld\n", t);
}
% uname -r
5.99.6
% ./a.out
1232245817
1232245817
% uname -r
5.99.7
% ./a.out
1232245863
2168577230055273063
>Fix:
>Unformatted:
Home |
Main Index |
Thread Index |
Old Index