projects
/
oweals
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7740fd6
)
uhttpd: explicitely use gmt times
author
Jo-Philipp Wich
<jow@openwrt.org>
Fri, 19 Mar 2010 14:51:12 +0000
(14:51 +0000)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Fri, 19 Mar 2010 14:51:12 +0000
(14:51 +0000)
contrib/package/uhttpd/src/uhttpd-file.c
patch
|
blob
|
history
diff --git
a/contrib/package/uhttpd/src/uhttpd-file.c
b/contrib/package/uhttpd/src/uhttpd-file.c
index fb70b33bf1e99bdc594e43295c439123cbb92278..c0e353a8ef5598b320745230d64cc34975372a5b 100644
(file)
--- 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 =
local
time(&ts);
+ struct tm *t =
gm
time(&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;
}