diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2010-03-19 14:51:12 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2010-03-19 14:51:12 +0000 |
commit | 66ffcefa5555b35fc2e71429d9be16ac6de82801 (patch) | |
tree | 0e9ba0b2d2310d2f07d67e8060a62e80ce0da59c /contrib | |
parent | 7740fd666589d0422359e4fa7b95eebb9ad8b7e5 (diff) |
uhttpd: explicitely use gmt times
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/package/uhttpd/src/uhttpd-file.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/package/uhttpd/src/uhttpd-file.c b/contrib/package/uhttpd/src/uhttpd-file.c index fb70b33bf..c0e353a8e 100644 --- a/contrib/package/uhttpd/src/uhttpd-file.c +++ b/contrib/package/uhttpd/src/uhttpd-file.c @@ -53,7 +53,7 @@ static time_t uh_file_date2unix(const char *date) memset(&t, 0, sizeof(t)); if( strptime(date, "%a, %d %b %Y %H:%M:%S %Z", &t) != NULL ) - return mktime(&t); + return timegm(&t); return 0; } @@ -61,9 +61,9 @@ static time_t uh_file_date2unix(const char *date) static char * uh_file_unix2date(time_t ts) { static char str[128]; - struct tm *t = localtime(&ts); + struct tm *t = gmtime(&ts); - strftime(str, sizeof(str), "%a, %d %b %Y %H:%M:%S %Z", t); + strftime(str, sizeof(str), "%a, %d %b %Y %H:%M:%S GMT", t); return str; } |