From 51291d61e2cfa747ee567f668c0e8cc0122107a3 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 14 Apr 2009 12:08:07 +0000 Subject: [PATCH] * localtime.cc (tzload): Implement setting __tzrule's offset member using newlib's __gettzinfo () interface also when tzload returns successfully. --- winsup/cygwin/ChangeLog | 6 ++++++ winsup/cygwin/localtime.cc | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 6c28c6cde..795381ca0 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,9 @@ +2009-04-14 Corinna Vinschen + + * localtime.cc (tzload): Implement setting __tzrule's offset member + using newlib's __gettzinfo () interface also when tzload returns + successfully. + 2009-04-13 Dave Korn * include/stdint.h (intptr_t): Remove long from type. diff --git a/winsup/cygwin/localtime.cc b/winsup/cygwin/localtime.cc index 3d5b29c46..6c05851bd 100644 --- a/winsup/cygwin/localtime.cc +++ b/winsup/cygwin/localtime.cc @@ -859,6 +859,10 @@ tzload(const char *name, struct state *sp) } } } + __gettzinfo ()->__tzrule[0].offset + = -sp->ttis[1].tt_gmtoff; + __gettzinfo ()->__tzrule[1].offset + = -sp->ttis[0].tt_gmtoff; return 0; }