class O2GTimeConverter
Brief
The class provides a method to convert calendar values between the time zones.
Details
To get an instance of the class, use the
O2GSession.getTimeConverter
method. For example,
O2GTimeConverter converter = mSession.getTimeConverter();
To convert a calendar value to a different time zone, use the convert method of the class.
For example, to convert a calendar value to the Eastern Standard Time zone, write the following line:
calDate = converter.convert(calDate, O2GTimeConverterTimeZone.EST);
Available time zones are specified by the O2GTimeConverterTimeZone enum.
Example
Convert calendar value into the EST zone [hide]
O2GTimeConverter converter = mSession.getTimeConverter();
Calendar calDate = Calendar.getInstance();
System.out.println("Original Timezone is: " + calDate.getTimeZone().getID());
calDate = converter.convert(calDate, O2GTimeConverterTimeZone.EST);
System.out.println("Converted Timezone is: " + calDate.getTimeZone().getID());
The namespace is com.fxcore2.
| Public Methods | |
|
Converts a calendar value to a specified time zone. |
|