summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChet Ramey <chet.ramey@case.edu>2011-12-07 09:06:49 -0500
committerChet Ramey <chet.ramey@case.edu>2011-12-07 09:06:49 -0500
commitc184f64511d31b4d986a1c545b3cb1461f2b7011 (patch)
tree29b2d5500969ddec28f8a1176bdab904a1c9f93f /lib
parent1c3567dccbe4c1635fb8e8968df71f70d98fd567 (diff)
downloadbash-c184f64511d31b4d986a1c545b3cb1461f2b7011.tar.gz
commit bash-20070419 snapshot
Diffstat (limited to 'lib')
-rw-r--r--lib/sh/strftime.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/sh/strftime.c b/lib/sh/strftime.c
index 0783d28d..ba72fbd8 100644
--- a/lib/sh/strftime.c
+++ b/lib/sh/strftime.c
@@ -471,6 +471,8 @@ strftime(char *s, size_t maxsize, const char *format, const struct tm *timeptr)
* us that muck around with various message processors.
*/
case 'z': /* time zone offset east of GMT e.g. -0600 */
+ if (timeptr->tm_isdst < 0)
+ break;
#ifdef HAVE_TM_NAME
/*
* Systems with tm_name probably have tm_tzadj as
@@ -493,7 +495,7 @@ strftime(char *s, size_t maxsize, const char *format, const struct tm *timeptr)
# ifdef HPUX
off = -timezone / 60;
# else
- off = -(daylight ? timezone : altzone) / 60;
+ off = -(daylight ? altzone : timezone) / 60;
# endif /* !HPUX */
#else /* !HAVE_TZNAME */
gettimeofday(& tv, & zone);