< prev index next >
src/java.base/share/classes/sun/util/calendar/ZoneInfo.java
Print this page
rev 54082 : 8262110: DST starts from incorrect time in 2038
8073446: TimeZone getOffset API does not return a dst offset between years 2038-2137
Reviewed-by: rriggs
*** 1,7 ****
/*
! * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 282,292 ****
msec -= rawOffset;
}
int dstoffset = tz.getOffset(msec) - rawOffset;
// Check if it's in a standard-to-daylight transition.
! if (dstoffset > 0 && tz.getOffset(msec - dstoffset) == rawoffset) {
dstoffset = 0;
}
if (offsets != null) {
offsets[0] = rawoffset;
--- 282,292 ----
msec -= rawOffset;
}
int dstoffset = tz.getOffset(msec) - rawOffset;
// Check if it's in a standard-to-daylight transition.
! if (dstoffset > 0 && tz.getOffset(msec - dstoffset) == rawoffset && type == WALL_TIME) {
dstoffset = 0;
}
if (offsets != null) {
offsets[0] = rawoffset;
< prev index next >