summaryrefslogtreecommitdiff
path: root/lib/getdate.y
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2001-04-08 19:58:59 +0000
committerJim Meyering <jim@meyering.net>2001-04-08 19:58:59 +0000
commitb7cd544ce5375133eef142ecef33f27604900a89 (patch)
tree563128fddbc8212cb427169297575335236a19cc /lib/getdate.y
parent8e94dcc2c645dd1ac02784360a805889d8ff6bd8 (diff)
downloadcoreutils-b7cd544ce5375133eef142ecef33f27604900a89.tar.xz
that's necessary when the offset spans a DST transition.
Diffstat (limited to 'lib/getdate.y')
-rw-r--r--lib/getdate.y4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/getdate.y b/lib/getdate.y
index 3210e5367..3525295bb 100644
--- a/lib/getdate.y
+++ b/lib/getdate.y
@@ -990,7 +990,8 @@ get_date (const char *p, const time_t *now)
/* Let mktime deduce tm_isdst if we have an absolute time stamp,
or if the relative time stamp mentions days, months, or years. */
- if (pc.dates_seen | pc.days_seen | pc.times_seen | pc.rel_day | pc.rel_month | pc.rel_year)
+ if (pc.dates_seen | pc.days_seen | pc.times_seen | pc.rel_day
+ | pc.rel_month | pc.rel_year)
tm.tm_isdst = -1;
/* But if the input explicitly specifies local time with or without
@@ -1037,6 +1038,7 @@ get_date (const char *p, const time_t *now)
{
tm.tm_mday += ((pc.day_number - tm.tm_wday + 7) % 7
+ 7 * (pc.day_ordinal - (0 < pc.day_ordinal)));
+ tm.tm_isdst = -1;
Start = mktime (&tm);
if (Start == (time_t) -1)
return Start;