diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2014-09-28 17:33:59 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2014-09-28 17:33:59 -0400 |
commit | fa02bd8b41017812302961f5c485d829d803437b (patch) | |
tree | abf3fa6ea55b9ed264def91d7b7b8294bd499af8 /gpsutils.c | |
parent | fcbba18745a3f2ead96c032f778237d82895810f (diff) | |
download | gpsd-fa02bd8b41017812302961f5c485d829d803437b.tar.gz |
GNU libc timegm() turns out to be buggy when DST is on (glibc-2.19).
Fortunately, there's a much simpler way to do the computation correctly.
All regression tests pass,
Diffstat (limited to 'gpsutils.c')
-rw-r--r-- | gpsutils.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -321,7 +321,7 @@ timestamp_t iso8601_to_unix( /*@in@*/ char *isotime) usec = strtod(dp, NULL); else usec = 0; - return (timestamp_t)timegm(&tm) + usec; + return (timestamp_t)mktime(&tm) - timezone + usec; #else double usec = 0; |