chiark / gitweb /
import: prefer usec_t over time_t
[elogind.git] / src / import / curl-util.c
index 78a58a8a6df6bad89311ae37a34c104d9e9242df..6a6b1c00048c7f75b58c4af3fe944f7ddf90e0c6 100644 (file)
@@ -414,7 +414,7 @@ int curl_header_strdup(const void *contents, size_t sz, const char *field, char
         return 1;
 }
 
-int curl_parse_http_time(const char *t, time_t *ret) {
+int curl_parse_http_time(const char *t, usec_t *ret) {
         struct tm tm;
         time_t v;
 
@@ -441,6 +441,6 @@ int curl_parse_http_time(const char *t, time_t *ret) {
         if (v == (time_t) -1)
                 return -EINVAL;
 
-        *ret = v;
+        *ret = (usec_t) v * USEC_PER_SEC;
         return 0;
 }