|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--dfischer.femtowebserver.lib.ZoneTime
Library for date and time output - supports time zones.
Httpd.setTimeZone(java.lang.String)| Field Summary | |
static java.lang.String[] |
MONTH_SHORT_STRING
Array[0..11], of (all) short month names. |
static java.lang.String[] |
MONTH_SHORT_STRING_UPPECASE
Array[0..11], of (all) short month names in UPPERCASE. |
static java.lang.String[][] |
TIME_ZONE
Array[time-zone-description 0 .. time-zone-description n-1][time-zone-ID] of all time zones. |
| Method Summary | |
static java.util.Date |
currentDate()
Returns the current date in the time zone GMT. |
static java.lang.String |
dateToShortString()
Returns the current date in the default time zone as text string, formatted as "DD MMM YYYY HH:MM:SS.mmm". |
static java.lang.String |
dateToShortString(java.util.Date date,
boolean millis)
Returns a recalculated GMT date in the default time zone as text string, formatted as "DD MMM YYYY HH:MM:SS[.mmm]". |
static java.lang.String |
dateToShortString(java.util.Date date,
java.lang.String timeZone,
boolean millis)
Returns a recalculated GMT date in the desired time zone as text string, formatted as "DD MMM YYYY HH:MM:SS[.mmm]". |
static java.lang.String |
dateToShortString(java.lang.String timeZone,
boolean millis)
Returns the current date in the desired time zone as text string, formatted as "DD MMM YYYY HH:MM:SS[.mmm]". |
static java.lang.String |
getDefaultTimeZone()
Returns the default time zone ID. |
static java.util.GregorianCalendar |
getGregorianCalendar(java.util.Date date,
java.lang.String timeZone)
Creates a calendar in a desired time zone, based on a GMT date. |
static java.util.TimeZone |
getTimeZone(java.lang.String timeZone)
Converts the time zone ID to a java.util.TimeZone |
static void |
setDefaultTimeZone(java.lang.String timeZone)
Alters the default time zone. |
static java.lang.String |
timeZoneToFullString(java.lang.String timeZone)
Translates a time zone ID to its specific text-description |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String[] MONTH_SHORT_STRING
MONTH_SHORT_STRING = {"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"};public static final java.lang.String[] MONTH_SHORT_STRING_UPPECASE
MONTH_SHORT_STRING_UPPECASE = {"JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC"};public static final java.lang.String[][] TIME_ZONE
TIME_ZONE[][] =
{{"(GMT -11:00) Midway-Islands, Samoa","MIT"},
{"(GMT -10:00) Hawaii","HST"},
{"(GMT -9:00) Alaska","AST"},
{"(GMT -8:00) Pacific Time (US and Canada), Tijuana","PST"},
{"(GMT -7:00) Mountain Time (US and Canada)","MST"},
{"(GMT -7:00) Arizona","PNT"},
{"(GMT -6:00) Central Time (US and Canada)","CST"},
{"(GMT -5:00) Eastern Time","EST"},
{"(GMT -5:00) Bogota, Lima, Quito, Indiana","IET"},
{"(GMT -4:00) Atlantic","PRT"},
{"(GMT -3:30) Newfoundland","CNT"},
{"(GMT -3:00) Brasil","BET"},
{"(GMT -1:00) Azores, Cape Verde Islands","CAT"},
{"(GMT) GMT, Casablanca, Monrovia","GMT"},
{"(GMT) Dublin, Edinburg, Lissabon, London","WET"},
{"(GMT +1:00) Amsterdam, Berlin, Bern, Paris, Madrid, Rom, Wien","ECT"},
{"(GMT +2:00) Athen, Istambul, Helsinki","EET"},
{"(GMT +3:00) Bagdad, Kuwait, Riad","EAT"},
{"(GMT +3:30) Teheran","MET"},
{"(GMT +4:00) Abu Dhabi, Tiflis","NET"},
{"(GMT +5:00) Islamabad, Karachi","PLT"},
{"(GMT +5:30) New-Dehlhi, Bombay, Calcutta","IST"},
{"(GMT +6:00) Dakka, Colombo","BST"},
{"(GMT +7:00) Bangkok, Hanoi, Jakarta","VST"},
{"(GMT +8:00) Peking, Hongkong","CTT"},
{"(GMT +9:00) Osaka, Sapporor, Tokio","JST"},
{"(GMT +9:30) Darwin","ACT"},
{"(GMT +10:00) Canberra, Melbourne, Sydney","AET"},
{"(GMT +11:00) Salomon-Islands","SST"},
{"(GMT +12:00) Auckland, Wellington","NST"}};
| Method Detail |
public static void setDefaultTimeZone(java.lang.String timeZone)
timeZone - time zone IDpublic static java.lang.String getDefaultTimeZone()
public static java.util.TimeZone getTimeZone(java.lang.String timeZone)
timeZone - time zone IDpublic static java.lang.String timeZoneToFullString(java.lang.String timeZone)
time - zone IDpublic static java.util.Date currentDate()
public static java.util.GregorianCalendar getGregorianCalendar(java.util.Date date,
java.lang.String timeZone)
date - date in the time zone GMTtimeZone - desired time zone of calendarcurrentDate()public static java.lang.String dateToShortString()
setDefaultTimeZone(java.lang.String)
public static java.lang.String dateToShortString(java.lang.String timeZone,
boolean millis)
timeZone - time zone ID of desired time zonemillis - flag: if true, the result text string contains also milliseconds
public static java.lang.String dateToShortString(java.util.Date date,
boolean millis)
date - date in the time zone GMTmillis - flag: if true, the result text string contains also millisecondscurrentDate(),
setDefaultTimeZone(java.lang.String)
public static java.lang.String dateToShortString(java.util.Date date,
java.lang.String timeZone,
boolean millis)
date - date in the time zone GMTtimeZone - time zone ID of desired time zonemillis - flag: if true, the result text string contains also millisecondscurrentDate()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||