From: Jim Meyering Date: Mon, 25 Apr 1994 16:34:49 +0000 (+0000) Subject: merge with 1.9.4f X-Git-Tag: textutils-1_12_1~714 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=256a906698a239f6011303a26cd155b9bdb9f063;p=thirdparty%2Fcoreutils.git merge with 1.9.4f --- 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);