comparison src/c/urweb.c @ 1140:ae818127a725

Remove a faulty time tweak from Postgres serialization
author Adam Chlipala <adamc@hcoop.net>
date Sat, 30 Jan 2010 13:39:39 -0500
parents b7118ffd32ae
children bafb6a5a52a9
comparison
equal deleted inserted replaced
1139:398ed1b89ee7 1140:ae818127a725
2414 char *r, *s; 2414 char *r, *s;
2415 struct tm stm; 2415 struct tm stm;
2416 2416
2417 if (localtime_r(&t, &stm)) { 2417 if (localtime_r(&t, &stm)) {
2418 s = uw_malloc(ctx, TIMES_MAX); 2418 s = uw_malloc(ctx, TIMES_MAX);
2419 --stm.tm_hour;
2420 len = strftime(s, TIMES_MAX, TIME_FMT, &stm); 2419 len = strftime(s, TIMES_MAX, TIME_FMT, &stm);
2421 r = uw_malloc(ctx, len + 14); 2420 r = uw_malloc(ctx, len + 14);
2422 sprintf(r, "'%s'::timestamp", s); 2421 sprintf(r, "'%s'::timestamp", s);
2423 return r; 2422 return r;
2424 } else 2423 } else