skokal01 / mongoose

Automatically exported from code.google.com/p/mongoose
0 stars 0 forks source link

send_file() uses localtime() but format specifies GMT #42

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
send_file() uses the format:
  const char *fmt = "%a, %d %b %Y %H:%M:%S GMT";

but then uses localtime() as the parameter to strftime():
  (void) strftime(date, sizeof(date), fmt, localtime(&curtime));
  (void) strftime(lm, sizeof(lm), fmt, localtime(&stp->mtime));

Wouldn't this create a time string that indicates that it is GMT, but is
instead local time.  Shouldn't localtime() be replaced by gmtime()?

Original issue reported on code.google.com by gilbert....@gmail.com on 20 May 2009 at 5:06

GoogleCodeExporter commented 9 years ago
Reporting local time zone instead of GMT.
Submitted http://code.google.com/p/mongoose/source/detail?r=367
Thank you.

Original comment by valenok on 20 May 2009 at 8:29