The examples in this section apply only to UTCDate and UTCTime parameters, which accept values based on the Coordinated Universal Time (UTC) standard.

When using UTCDate and UTCTime parameters, values given to the Clock must be represented as UTC values. This ensures an accurate result when calculating the local date and time for the device based on offsets for Time Zone and Daylight Saving Time, if any. If local time is used as a starting point, the order in which the Date, Time, and Time Zone are set could affect the resulting values. The examples below explain how to make these calculations correctly.

UTC is the equivalent of the Local Time Coordinate (LTC) at the Prime Meridian in Greenwich, England, where no offsets apply. For most other places, LTC is calculated starting with the UTC and adding or subtracting time based on the Time Zone in which the device being used, plus or minus the Daylight Saving Time offset, if any.

For more information, refer to these reference sites:


Example #1

This example inverts the UTC offset. Since UTC time is later than Eastern time, hours are added to the desired Eastern time to calculate its UTC equivalent. When this figure is put into the device, the Clock recalculates the value to arrive at the desired local time for display by the device and for use in applications.

1. Note the desired local time for the device:

2. Make the following observations about device location:

3. Calculate the UTC value from the desired LTC:

4. The values specified to the Clock would therefore be:

When converted by the Clock, these UTC values would appear as the correct LTC values on the device.


Example #2

This example also inverts the UTC offset. Since UTC time is earlier than India time, hours are subtracted from the desired Bangalore time to calculate its UTC equivalent, which results in a (backward) cross of the Prime Meridian (dateline). When this figure is put into the device, the Clock recalculates the value to arrive at the desired local time and day for display and program use.

1. Note the desired local time for the device:

2. Make the following observations about device location:

3. Calculate the UTC value from the desired LTC:

4. The values specified to the Clock would therefore be:

Note the Date is July 10, 2010, one day before the desired local time. That is because when it's 2:55 a.m. on July 11 in India, it's 9:25 p.m. (5 1/2 hours earlier) in Greenwich, England (where UTC originates), and the date is still July 10.

When converted by the Clock, these UTC values would appear as the correct LTC values on a device in Bangalore.