Skip to content
Snippets Groups Projects
Commit ef97fce2 authored by Martin Nilsson's avatar Martin Nilsson
Browse files

Use Calendar http_time for http_decode.date.

parent ae43560b
No related branches found
No related tags found
No related merge requests found
......@@ -62,8 +62,8 @@ string http_date(int time)
//! zero (UNDEFINED) if the given string isn't a HTTP date
int http_decode_date(string data)
{
Calendar.ISO_UTC.Second s=
Calendar.ISO_UTC.parse("%e, %D %M %Y %h:%m:%s GMT",data);
Calendar.ISO_UTC.Second s=Calendar.ISO_UTC.http_time(data);
if (!s) return UNDEFINED;
return s->unix_time();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment