From 8d2f9f58a034951c99ca4f426764e14f55155369 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 25 Apr 1994 16:34:49 +0000 Subject: [PATCH] merge with 1.9.4f --- lib/getdate.y | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/getdate.y b/lib/getdate.y index 31e402b23c..fd545d6ca0 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); -- 2.30.2