]> Dogcows Code - chaz/tar/blobdiff - lib/getdate.y
(get_date):
[chaz/tar] / lib / getdate.y
index 165a2df34882aff1d7aa9507da10e135467e42ba..eb1fe7bef7ebc854208a95ec0a6598a2e6d14484 100644 (file)
@@ -831,7 +831,10 @@ yyerror (char *s ATTRIBUTE_UNUSED)
   return 0;
 }
 
-/* ?? */
+/* Parse a date/time string P.  Return the corresponding time_t value,
+   or (time_t) -1 if there is an error.  P can be an incomplete or
+   relative time specification; if so, use *NOW as the basis for the
+   returned time.  */
 time_t
 get_date (const char *p, const time_t *now)
 {
@@ -1011,7 +1014,7 @@ get_date (const char *p, const time_t *now)
       if (! gmt)
        return -1;
       delta = pc.time_zone * 60 + difftm (gmt, &tm);
-      if ((Start - delta < Start) != (delta < 0))
+      if ((Start < Start - delta) != (delta < 0))
        return -1;      /* time_t overflow */
       Start -= delta;
     }
This page took 0.021984 seconds and 4 git commands to generate.