diff options
author | Jim Meyering <jim@meyering.net> | 1994-04-25 16:34:49 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1994-04-25 16:34:49 +0000 |
commit | 256a906698a239f6011303a26cd155b9bdb9f063 (patch) | |
tree | 569a1bbc80433001c1f560ad158fd418d36fd262 /lib/getdate.y | |
parent | 7c68f857d0f0df3dac81ff27ff7f2205abe859fd (diff) | |
download | coreutils-256a906698a239f6011303a26cd155b9bdb9f063.tar.xz |
merge with 1.9.4f
Diffstat (limited to 'lib/getdate.y')
-rw-r--r-- | lib/getdate.y | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/getdate.y b/lib/getdate.y index 31e402b23..fd545d6ca 100644 --- a/lib/getdate.y +++ b/lib/getdate.y @@ -904,8 +904,14 @@ get_date(p, now) if (! (tm = gmtime (&ftz.time))) return -1; - gmt = *tm; /* Make a copy, in case localtime modifies *tm. */ - ftz.timezone = difftm (&gmt, localtime (&ftz.time)) / 60; + gmt = *tm; + + if (! (tm = localtime (&ftz.time))) + return -1; + + ftz.timezone = difftm (&gmt, tm) / 60; + if(tm->tm_isdst) + ftz.timezone += 60; } tm = localtime(&now->time); |