commit 33433b3fde56d9b3ac6de6ee2584416b82bc856f from: rsc date: Tue Apr 17 05:45:27 2007 UTC allow longer timezones from %Z (xav@chantry) commit - adcb656c84b8a311eeebe31d9cc530c1ed822e5b commit + 33433b3fde56d9b3ac6de6ee2584416b82bc856f blob - b4e4484ce357c3d00725423380bf21555b357bf8 blob + a0f39060e04d9a377dd7db9edab63befba4bfc45 --- src/lib9/date.c +++ 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 @@ tm2Tm(struct tm *tm, Tm *bigtm, int gmt) bigtm->tzoff = 0; }else{ dotz(); - strcpy(bigtm->zone, tzone); + strncpy(bigtm->zone, tzone, 3); + bigtm->zone[3] = 0; bigtm->tzoff = tzdelta; } }