timestamp_t: a new data type for timestamps
[gitweb.git] / ref-filter.c
index 9287126600168c07e3b73e21b9222c4b017caede..1fc5e9970db1b821384e61942db856504ce46902 100644 (file)
@@ -849,7 +849,7 @@ static void grab_date(const char *buf, struct atom_value *v, const char *atomnam
 {
        const char *eoemail = strstr(buf, "> ");
        char *zone;
-       unsigned long timestamp;
+       timestamp_t timestamp;
        long tz;
        struct date_mode date_mode = { DATE_NORMAL };
        const char *formatp;
@@ -868,8 +868,8 @@ static void grab_date(const char *buf, struct atom_value *v, const char *atomnam
 
        if (!eoemail)
                goto bad;
-       timestamp = strtoul(eoemail + 2, &zone, 10);
-       if (timestamp == ULONG_MAX)
+       timestamp = parse_timestamp(eoemail + 2, &zone, 10);
+       if (timestamp == TIME_MAX)
                goto bad;
        tz = strtol(zone, NULL, 10);
        if ((tz == LONG_MIN || tz == LONG_MAX) && errno == ERANGE)