19 package org.sleuthkit.autopsy.coreutils;
21 import java.text.DateFormat;
22 import java.text.SimpleDateFormat;
23 import java.util.GregorianCalendar;
41 java.util.TimeZone zone = java.util.TimeZone.getTimeZone(timeZoneId);
42 int offset = zone.getRawOffset() / 1000;
43 int hour = offset / 3600;
44 int min = (offset % 3600) / 60;
46 DateFormat dfm =
new SimpleDateFormat(
"z");
47 dfm.setTimeZone(zone);
48 boolean hasDaylight = zone.useDaylightTime();
49 String first = dfm.format(
new GregorianCalendar(2010, 1, 1).getTime()).substring(0, 3);
50 String second = dfm.format(
new GregorianCalendar(2011, 6, 6).getTime()).substring(0, 3);
52 String result = first + Integer.toString(mid);
54 result = result +
":" + Integer.toString(min);
static String convertToAlphaNumericFormat(String timeZoneId)