jdk/src/share/classes/sun/util/calendar/ZoneInfoFile.java
changeset 21842 81911f748777
parent 21306 e56a970409e5
equal deleted inserted replaced
21838:72472170840d 21842:81911f748777
   404     // ZoneInfo has an ending entry for 2037, this need to be offset by
   404     // ZoneInfo has an ending entry for 2037, this need to be offset by
   405     // a "rawOffset"
   405     // a "rawOffset"
   406     // LocalDateTime.of(2037, 1, 1, 0, 0, 0).toEpochSecond(ZoneOffset.UTC));
   406     // LocalDateTime.of(2037, 1, 1, 0, 0, 0).toEpochSecond(ZoneOffset.UTC));
   407     private static final long LDT2037 = 2114380800L;
   407     private static final long LDT2037 = 2114380800L;
   408 
   408 
       
   409     //Current time. Used to determine future GMToffset transitions
       
   410     private static final long CURRT = System.currentTimeMillis()/1000;
       
   411 
   409     /* Get a ZoneInfo instance.
   412     /* Get a ZoneInfo instance.
   410      *
   413      *
   411      * @param standardTransitions  the standard transitions, not null
   414      * @param standardTransitions  the standard transitions, not null
   412      * @param standardOffsets  the standard offsets, not null
   415      * @param standardOffsets  the standard offsets, not null
   413      * @param savingsInstantTransitions  the standard transitions, not null
   416      * @param savingsInstantTransitions  the standard transitions, not null
   425         int checksum = 0;
   428         int checksum = 0;
   426         int[] params = null;
   429         int[] params = null;
   427         boolean willGMTOffsetChange = false;
   430         boolean willGMTOffsetChange = false;
   428 
   431 
   429         // rawOffset, pick the last one
   432         // rawOffset, pick the last one
   430         if (standardTransitions.length > 0)
   433         if (standardTransitions.length > 0) {
   431             rawOffset = standardOffsets[standardOffsets.length - 1] * 1000;
   434             rawOffset = standardOffsets[standardOffsets.length - 1] * 1000;
       
   435             willGMTOffsetChange = standardTransitions[standardTransitions.length - 1] > CURRT;
       
   436         }
   432         else
   437         else
   433             rawOffset = standardOffsets[0] * 1000;
   438             rawOffset = standardOffsets[0] * 1000;
   434 
   439 
   435         // transitions, offsets;
   440         // transitions, offsets;
   436         long[] transitions = null;
   441         long[] transitions = null;