localtim/gmtime: correct which one is applying corrections
authorAlan Cox <alan@linux.intel.com>
Wed, 21 Feb 2018 21:28:26 +0000 (21:28 +0000)
committerAlan Cox <alan@linux.intel.com>
Wed, 21 Feb 2018 21:28:26 +0000 (21:28 +0000)
Still need to sort the actual correction logic out

Library/libs/gmtime.c
Library/libs/localtim.c

index e32145c..92e2be5 100644 (file)
@@ -61,6 +61,6 @@ void __tm_conv(struct tm *tmbuf, time_t * pt, int offset)
 struct tm *gmtime(time_t *timep)
 {
        static struct tm tmb;
-       __tm_conv(&tmb, timep, (int) (timezone / 60));
+       __tm_conv(&tmb, timep, 0);
        return &tmb;
 }
index 4605d4c..2bec36b 100644 (file)
@@ -4,6 +4,6 @@
 struct tm *localtime(time_t * timep)
 {
        static struct tm tmb;
-       __tm_conv(&tmb, timep, 0);
+       __tm_conv(&tmb, timep, (int) (timezone / 60));
        return &tmb;
 }