timestamp_t: a new data type for timestamps
[gitweb.git] / builtin / am.c
index f7a7a971fbe762a4fb691e786e86f681f2bbd7c1..89914ed875709f0263ff7f7a6c25157d1d30fbd2 100644 (file)
@@ -877,12 +877,12 @@ static int hg_patch_to_mail(FILE *out, FILE *in, int keep_cr)
                if (skip_prefix(sb.buf, "# User ", &str))
                        fprintf(out, "From: %s\n", str);
                else if (skip_prefix(sb.buf, "# Date ", &str)) {
-                       unsigned long timestamp;
+                       timestamp_t timestamp;
                        long tz, tz2;
                        char *end;
 
                        errno = 0;
-                       timestamp = strtoul(str, &end, 10);
+                       timestamp = parse_timestamp(str, &end, 10);
                        if (errno)
                                return error(_("invalid timestamp"));