Incorrect Interpretation of POSIX TZ Environment Variable on AIX

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: P4
    • tbd
    • Affects Version/s: 11, 17, 21, 25
    • Component/s: core-libs

      Impact:
      Incorrect Timezone value.

      Reproduction:
      The issue can be reproduced on AIX using the following standalone Java program:

      public class TZCheck {
        public static void main(String[] args) {
          System.out.println("Default TZ: " + java.util.TimeZone.getDefault());
        }
      }

      export TZ=CET-1CEST,M3.5.0,M10.5.0


      Expected :
      Default TZ: sun.util.calendar.ZoneInfo[id="Europe/Paris",offset=3600000,dstSavings=3600000,useDaylight=true,transitions=184,lastRule=java.util.SimpleTimeZone[id=Europe/Paris,offset=3600000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=2,startMonth=2,startDay=-1,startDayOfWeek=1,startTime=3600000,startTimeMode=2,endMode=2,endMonth=9,endDay=-1,endDayOfWeek=1,endTime=3600000,endTimeMode=2]]

      Actual :
      Default TZ: sun.util.calendar.ZoneInfo[id="GMT+01:00",offset=3600000,dstSavings=0,useDaylight=false,transitions=0,lastRule=null]

      Affected File:
      src/java.base/unix/native/libjava/TimeZone_md.c

            Assignee:
            Unassigned
            Reporter:
            Shruthi Acharya
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: