Top Description Fields Constructors Methods
net.fortuna.ical4j.util

public final Class TimeZones

extends Object
Class Inheritance
Imports
java.util.TimeZone

$Id$ [5/07/2004] Utility methods relevant to Java timezones.
Author
Ben Fortuna

Field Summary

Modifier and TypeField and Description
public static final String
GMT_ID

The timezone identifier for GMT time.

public static final String
IBM_UTC_ID

The timezone identifier for UTC time in the IBM JVM.

public static final String
UTC_ID

The timezone identifier for UTC time.

private static final TimeZone

Constructor Summary

AccessConstructor and Description
private
TimeZones()

Constructor made private to enforce static nature.

Method Summary

Modifier and TypeMethod and Description
public static TimeZone

Returns:

the timezone used for date instances
getDateTimeZone
()

Although timezones are not really applicable to DATE instances in iCalendar, the implementation in iCal4j requires the use of a timezone.

public static TimeZone
public static TimeZone
getUtcTimeZone()

Get the UTC Timezone.

public static boolean

Returns:

true if the timezone is UTC time, otherwise false
isUtc
(final TimeZone
a timezone instance
timezone
)

Indicates whether the specified timezone is equivalent to UTC time.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

GMT_IDback to summary
public static final String GMT_ID

The timezone identifier for GMT time.

IBM_UTC_IDback to summary
public static final String IBM_UTC_ID

The timezone identifier for UTC time in the IBM JVM.

UTC_IDback to summary
public static final String UTC_ID

The timezone identifier for UTC time.

UTC_TIMEZONEback to summary
private static final TimeZone UTC_TIMEZONE

Constructor Detail

TimeZonesback to summary
private TimeZones()

Constructor made private to enforce static nature.

Method Detail

getDateTimeZoneback to summary
public static TimeZone getDateTimeZone()

Although timezones are not really applicable to DATE instances in iCalendar, the implementation in iCal4j requires the use of a timezone. Dates in iCal4j may be either "floating", in that they use the default Java timezone, or alternatively will use UTC (this is the default). The use of floating dates may be configured by specifying the following as a system property or in a file called "ical4j.properties" in the classpath:

net.fortuna.ical4j.timezone.date.floating=true
Returns:TimeZone

the timezone used for date instances

getDefaultback to summary
public static TimeZone getDefault()
getUtcTimeZoneback to summary
public static TimeZone getUtcTimeZone()

Get the UTC Timezone.

isUtcback to summary
public static boolean isUtc(final TimeZone timezone)

Indicates whether the specified timezone is equivalent to UTC time.

Parameters
timezone:TimeZone

a timezone instance

Returns:boolean

true if the timezone is UTC time, otherwise false