|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. --> |
|
3 <!-- This component and the accompanying materials are made available under the terms of the License |
|
4 "Eclipse Public License v1.0" which accompanies this distribution, |
|
5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". --> |
|
6 <!-- Initial Contributors: |
|
7 Nokia Corporation - initial contribution. |
|
8 Contributors: |
|
9 --> |
|
10 <!DOCTYPE task |
|
11 PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"> |
|
12 <task id="GUID-043A9408-1A97-4122-9364-965ECC08B40F" xml:lang="en"><title>Converting |
|
13 from any local time to UTC</title><prolog><metadata><keywords/></metadata></prolog><taskbody> |
|
14 <steps-unordered id="GUID-4DD07DEC-6017-4237-BE46-1D69E5FBD744-GENID-1-10-1-12-1-1-7-1-5-1-3-1-6-1-2-1"> |
|
15 <step id="GUID-9A69E5AD-E938-4092-A8C2-CB65C37C8962-GENID-1-10-1-12-1-1-7-1-5-1-3-1-6-1-2-1-1"><cmd>To convert the local |
|
16 time of a non-system time zone to UTC, use <xref href="GUID-37A4A4ED-FFF8-3C98-B028-EA1947EA7BEF.dita#GUID-37A4A4ED-FFF8-3C98-B028-EA1947EA7BEF/GUID-F2FCFD02-8FF3-3171-AF90-9755C00A87F8"><apiname>CTzConverter::ConvertToUniversalTime()</apiname></xref>, |
|
17 specifying the time zone to convert from: </cmd> |
|
18 <stepxmp><p><codeblock xml:space="preserve">TInt errCode = myConverter->ConvertToUniversalTime(myTime, myZoneId); |
|
19 </codeblock></p></stepxmp> |
|
20 <info><p>These time conversions internally do the following: <ul> |
|
21 <li><p>fetch a number of 'actualized' rules applicable to the years around |
|
22 the supplied time and zone, where an 'actualized' rule defines a single and |
|
23 specific time of year when local time changes. It is derived from the encoded |
|
24 day rule defined in the Olson’s TZ database RULE. </p></li> |
|
25 <li><p>cache these rules for subsequent use.</p></li> |
|
26 <li><p>identify which rule immediately precedes the time supplied.</p></li> |
|
27 <li><p>apply the appropriate offsets defined by this rule.</p></li> |
|
28 </ul></p></info> |
|
29 </step> |
|
30 </steps-unordered> |
|
31 </taskbody></task> |