diff options
author | Alex Musolino <alex@musolino.id.au> | 2019-10-31 09:41:03 +1030 |
---|---|---|
committer | Alex Musolino <alex@musolino.id.au> | 2019-10-31 09:41:03 +1030 |
commit | 06786f2a71cb5330e63cf50ba7eed8278b31c07f (patch) | |
tree | 1632165878b4f4e3054c0862c1a0ac113fd00641 /sys | |
parent | 6c434774926d3d02becbc726fff37f80bb16029b (diff) |
upas/fs: fix handling of numeric timezone offsets in strtotm
Since numeric timezone offsets are relative to GMT, initialise zone to
GMT so tm2sec(2) does not assume local time.
Note that if strtotm encounters a timezone *string* and consequently
overwrites zone then we will end up in the same mess since tm2sec(2)
only deals with GMT or local time.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/src/cmd/upas/fs/strtotm.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/src/cmd/upas/fs/strtotm.c b/sys/src/cmd/upas/fs/strtotm.c index ccdc7c16c..fc6510f1a 100644 --- a/sys/src/cmd/upas/fs/strtotm.c +++ b/sys/src/cmd/upas/fs/strtotm.c @@ -38,6 +38,7 @@ strtotm(char *p, Tm *t) tm.min = -1; tm.year = -1; tm.mday = -1; + memcpy(tm.zone, "GMT", 3); for(p = skipwhite(p); *p; p = skipwhite(q)){ q = skiptext(p); |