commit | 33433b3fde56d9b3ac6de6ee2584416b82bc856f | [log] [tgz] |
---|---|---|
author | rsc <devnull@localhost> | Tue Apr 17 05:45:27 2007 +0000 |
committer | rsc <devnull@localhost> | Tue Apr 17 05:45:27 2007 +0000 |
tree | 9b0acf797e7fe7e91379f369153a569a51f11df3 | |
parent | adcb656c84b8a311eeebe31d9cc530c1ed822e5b [diff] |
allow longer timezones from %Z (xav@chantry)
diff --git a/src/lib9/date.c b/src/lib9/date.c index b4e4484..a0f3906 100644 --- a/src/lib9/date.c +++ b/src/lib9/date.c
@@ -6,7 +6,7 @@ static int didtz; static int tzdelta; -static char tzone[4]; +static char tzone[32]; static void dotz(void) @@ -48,7 +48,8 @@ bigtm->tzoff = 0; }else{ dotz(); - strcpy(bigtm->zone, tzone); + strncpy(bigtm->zone, tzone, 3); + bigtm->zone[3] = 0; bigtm->tzoff = tzdelta; } }