aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/lang/natSystem.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/java/lang/natSystem.cc')
-rw-r--r--libjava/java/lang/natSystem.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/libjava/java/lang/natSystem.cc b/libjava/java/lang/natSystem.cc
index abf62ca..57e135c 100644
--- a/libjava/java/lang/natSystem.cc
+++ b/libjava/java/lang/natSystem.cc
@@ -249,9 +249,11 @@ java::lang::System::getSystemTimeZone (void)
mktime(tim = localtime(&current_time));
#ifdef STRUCT_TM_HAS_GMTOFF
- tzoffset = -(tim->tm_gmtoff); // tm_gmtoff is secs EAST of UTC.
+ // tm_gmtoff is secs EAST of UTC.
+ tzoffset = -(tim->tm_gmtoff) + tim->tm_isdst * 3600L;
#elif HAVE_TIMEZONE
- tzoffset = timezone; // timezone is secs WEST of UTC.
+ // timezone is secs WEST of UTC.
+ tzoffset = timezone;
#else
// FIXME: there must be another global if neither tm_gmtoff nor timezone
// is available, esp. if tzname is valid.