Gmtime() does not set .tzoff = 0, thus it may hold value from a preceding call to localtime(). Reference: /n/sources/patch/gmtime-tzoff-unset Date: Thu Aug 31 02:07:18 CES 2017 Signed-off-by: antox@ml.lv --- /sys/src/libc/9sys/ctime.c Thu Aug 31 02:05:28 2017 +++ /sys/src/libc/9sys/ctime.c Thu Aug 31 02:05:24 2017 @@ -154,6 +154,7 @@ xtime.mday = d0 + 1; xtime.mon = d1; strcpy(xtime.zone, "GMT"); + xtime.tzoff = 0; return &xtime; }