3 Replies Latest reply: Feb 28, 2007 8:16 AM by 807606 RSS

    How to show 3-letter Timezone in java code?

      Given the raw offset from GMT in milliseconds, I want to show a date with timezone (3-letter) in Java code, a date looks like 'Feb 12, 2007 EST'. I used 'GregorianCalendar.getTimeZone().getDefault().getID()', it shows 'Feb 12, 2007 America/New_York'. And If I used 'GregorianCalendar.getTimeZone().getDisplayName(true, GregorianCalendar.getTimeZone().SHORT)' or 'GregorianCalendar.getTimeZone().getDisplayName(true, TimeZone.SHORT)'', it shows 'Feb 12, 2007 GMT-05:00'. Does anyone know how I can get the 3-letter timezone name? Thanks in advance. Chen