chiark
/
gitweb
/
~mdw
/
mLib
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
e426940
)
Merge in differences from the resolver's version.
author
mdw
<mdw>
Sun, 10 Oct 1999 16:53:53 +0000
(16:53 +0000)
committer
mdw
<mdw>
Sun, 10 Oct 1999 16:53:53 +0000
(16:53 +0000)
getdate.y
patch
|
blob
|
blame
|
history
diff --git
a/getdate.y
b/getdate.y
index 4be26bf0669dad2b3ba59e168362680623129bd6..c1818de25f9f179468a098e2c416fa17cc3d612c 100644
(file)
--- a/
getdate.y
+++ b/
getdate.y
@@
-836,6
+836,8
@@
yylex ()
#define TM_YEAR_ORIGIN 1900
#define TM_YEAR_ORIGIN 1900
+#ifndef GETDATE_IGNORE_TIMEZONE
+
/* Yield A - B, measured in seconds. */
static long
difftm (a, b)
/* Yield A - B, measured in seconds. */
static long
difftm (a, b)
@@
-858,6
+860,8
@@
difftm (a, b)
+ (a->tm_sec - b->tm_sec));
}
+ (a->tm_sec - b->tm_sec));
}
+#endif
+
time_t
get_date (p, now)
const char *p;
time_t
get_date (p, now)
const char *p;
@@
-927,6
+931,7
@@
get_date (p, now)
zone by 24 hours to compensate. This algorithm assumes that
there is no DST transition within a day of the time_t boundaries. */
zone by 24 hours to compensate. This algorithm assumes that
there is no DST transition within a day of the time_t boundaries. */
+#ifndef GETDATE_IGNORE_TIMEZONE
if (yyHaveZone)
{
tm = tm0;
if (yyHaveZone)
{
tm = tm0;
@@
-942,6
+947,7
@@
get_date (p, now)
}
Start = mktime (&tm);
}
}
Start = mktime (&tm);
}
+#endif
if (Start == (time_t) -1)
return Start;
if (Start == (time_t) -1)
return Start;
@@
-956,6
+962,7
@@
get_date (p, now)
return Start;
}
return Start;
}
+#ifndef GETDATE_IGNORE_TIMEZONE
if (yyHaveZone)
{
long delta = yyTimezone * 60L + difftm (&tm, gmtime (&Start));
if (yyHaveZone)
{
long delta = yyTimezone * 60L + difftm (&tm, gmtime (&Start));
@@
-963,6
+970,7
@@
get_date (p, now)
return -1; /* time_t overflow */
Start += delta;
}
return -1; /* time_t overflow */
Start += delta;
}
+#endif
return Start;
}
return Start;
}