net.fortuna.ical4j.util
Class TimeZones

java.lang.Object
  extended by net.fortuna.ical4j.util.TimeZones

public final class TimeZones
extends Object

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

Author:
Ben Fortuna

Field Summary
static String GMT_ID
          The timezone identifier for GMT time.
static String IBM_UTC_ID
          The timezone identifier for UTC time in the IBM JVM.
static String UTC_ID
          The timezone identifier for UTC time.
 
Method Summary
static TimeZone getDateTimeZone()
          Although timezones are not really applicable to DATE instances in iCalendar, the implementation in iCal4j requires the use of a timezone.
static TimeZone getUtcTimeZone()
          Get the UTC Timezone.
static boolean isUtc(TimeZone timezone)
          Indicates whether the specified timezone is equivalent to UTC time.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UTC_ID

public static final String UTC_ID
The timezone identifier for UTC time.

See Also:
Constant Field Values

IBM_UTC_ID

public static final String IBM_UTC_ID
The timezone identifier for UTC time in the IBM JVM.

See Also:
Constant Field Values

GMT_ID

public static final String GMT_ID
The timezone identifier for GMT time.

See Also:
Constant Field Values
Method Detail

isUtc

public static boolean isUtc(TimeZone timezone)
Indicates whether the specified timezone is equivalent to UTC time.

Parameters:
timezone - a timezone instance
Returns:
true if the timezone is UTC time, otherwise false

getDateTimeZone

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:
the timezone used for date instances

getUtcTimeZone

public static TimeZone getUtcTimeZone()
Get the UTC Timezone.



Copyright © 2004-2012 Micronode. All Rights Reserved.