|
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 concept |
|
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
|
12 <concept id="GUID-676D1493-0035-4AD3-A0E5-A207B25809E4" xml:lang="en"><title>Time |
|
13 Zone Services Overview</title><prolog><metadata><keywords/></metadata></prolog><conbody> |
|
14 <section id="GUID-30F76544-4824-4979-93A6-CC7F09818443"> <title>Purpose</title><p>Interfaces |
|
15 within Time Zone Services are used to enable client applications to make updates |
|
16 to system TZ data, receive notification of time changes, and manage user-defined |
|
17 TZ data. Conversion services enable a client to convert time between Universal |
|
18 Time Coordinated and any other time. </p></section> |
|
19 <section id="GUID-8C787174-5ABD-4CE5-A205-986873AA5F00"><title>Key concepts/terms</title>The following terms are used throughout |
|
20 Time Zone Services documentation:<p><dl> |
|
21 <dlentry> |
|
22 <dt>P&S</dt> |
|
23 <dd><p>Publish and Subscribe. </p></dd> |
|
24 </dlentry> |
|
25 <dlentry> |
|
26 <dt>PKG</dt> |
|
27 <dd><p>Package File Format, which allows easy installation of software. </p></dd> |
|
28 </dlentry> |
|
29 <dlentry> |
|
30 <dt>SIS</dt> |
|
31 <dd><p>Symbian installation file. A collection of executables and/or data |
|
32 files packaged in a form suitable so that the Software Installer can install |
|
33 them onto a device.</p></dd> |
|
34 </dlentry> |
|
35 <dlentry> |
|
36 <dt>SWI </dt> |
|
37 <dd><p>Software Installer.</p></dd> |
|
38 </dlentry> |
|
39 <dlentry> |
|
40 <dt>System TZ data </dt> |
|
41 <dd><p>Refers to the time zone database found in the TZ Server component and |
|
42 the TZ localization resources found in the TZ Localization component.</p></dd> |
|
43 </dlentry> |
|
44 <dlentry> |
|
45 <dt>TZID</dt> |
|
46 <dd><p>Refers to the time zone database found in the TZ Server component and |
|
47 the TZ localization resources found in the TZ Localization component.</p></dd> |
|
48 </dlentry> |
|
49 <dlentry> |
|
50 <dt>TZ rules data</dt> |
|
51 <dd><p>Refers to the TZ rules found in the TZ database, the TZ rules that |
|
52 define the current/system TZ and the user-defined TZ rules.</p></dd> |
|
53 </dlentry> |
|
54 <dlentry> |
|
55 <dt>User-defined TZ data</dt> |
|
56 <dd><p>The TZ rules and TZ names (city name, region name and long/short standard |
|
57 time name and long/short daylight time names). User-defined TZ data may be |
|
58 added by the user of the device. </p></dd> |
|
59 </dlentry> |
|
60 <dlentry> |
|
61 <dt>UTC </dt> |
|
62 <dd><p>Universal Time Coordinated.</p></dd> |
|
63 </dlentry> |
|
64 </dl></p></section> |
|
65 <section id="GUID-4E5DB06A-4729-4008-BB03-9C3A27C4DE96"><title>Architectural relationships</title><p>Alarm Server and Calendar |
|
66 Server components depend on the latest TZ rules information. When notified |
|
67 of changes to TZ rules data these components update their TZ-dependent data. |
|
68 TZ conversion rules are used to convert between UTC and a time in the past, |
|
69 present or future, for any time zone.</p><p>Time zone conversion allows you |
|
70 to set the device time zone and to convert time between UTC and any time, |
|
71 past, present or future, for any time zone, as long as a rule exists for the |
|
72 conversion. </p></section> |
|
73 <section id="GUID-5C98F76D-C181-4D43-8784-1306830E4D7D"><title>Time Zone Services interfaces </title><p>The following classes |
|
74 form the main interface to Time Zone Services:</p><table id="GUID-F78AECCB-AEDE-4054-929C-DC756DA901AC"> |
|
75 <tgroup cols="2"><colspec colname="col1" colwidth="0.58*"/><colspec colname="col2" colwidth="1.42*"/> |
|
76 <thead> |
|
77 <row> |
|
78 <entry valign="top"><p>Interface</p></entry> |
|
79 <entry valign="top"><p>Description</p></entry> |
|
80 </row> |
|
81 </thead> |
|
82 <tbody> |
|
83 <row> |
|
84 <entry><p><codeph>CTzUserData</codeph></p></entry> |
|
85 <entry><p>Allows a client to manage user-defined time zones.</p></entry> |
|
86 </row> |
|
87 <row> |
|
88 <entry><p><codeph>CTzUserNames</codeph></p></entry> |
|
89 <entry><p>Contains the names for a user-defined time zone.</p></entry> |
|
90 </row> |
|
91 <row> |
|
92 <entry><p><codeph>CTzRules</codeph></p></entry> |
|
93 <entry><p>Encapsulates a collection of time zone rules</p></entry> |
|
94 </row> |
|
95 <row> |
|
96 <entry><p><codeph>CTzId</codeph></p></entry> |
|
97 <entry><p>Contains a time zone identifier.</p></entry> |
|
98 </row> |
|
99 <row> |
|
100 <entry><p><codeph>RTz</codeph></p></entry> |
|
101 <entry><p>Converts between UTC time and local time, and sets the current local |
|
102 time zone.</p></entry> |
|
103 </row> |
|
104 <row> |
|
105 <entry><p><codeph>CTzConverter</codeph></p></entry> |
|
106 <entry><p>Provides client-side caching for conversions in the local time zone.</p></entry> |
|
107 </row> |
|
108 </tbody> |
|
109 </tgroup> |
|
110 </table><p>The following interfaces are also used: </p><ul> |
|
111 <li><p>SWI service - see System TZ Data Update </p></li> |
|
112 <li><p>Resource files - see User-defined TZ Data </p></li> |
|
113 <li><p>Publish and Subscribe - see TZ Data Change Notification </p></li> |
|
114 </ul><p><b>System TZ data update</b></p><p>The system TZ data can be updated |
|
115 at run-time. The installation mechanism uses the standard SWI service to install |
|
116 a SIS file containing the updated TZ data onto a device.</p><p>Once the system |
|
117 TZ data has been updated using the SIS file, the device will automatically |
|
118 make use of the updated data. This includes updating any cached data managed |
|
119 by Symbian platform components and notifying all registered clients of the |
|
120 system TZ data change.</p><p/><p><b>User-defined TZ data</b></p><p><codeph>CTzUserData</codeph> provides |
|
121 functions to create, read, update or delete user-defined TZ data. The API |
|
122 also allows the TZIDs for all existing user-defined TZ data to be determined. |
|
123 </p><p><codeph>CTzUserNames</codeph> is used to contain the names for user-defined |
|
124 time zones. These include long/short standard time names, long/short daylight |
|
125 time names, city name and region name.</p><p>TZID is a time zone identifier |
|
126 contained in the <codeph>CTzId</codeph> class. There are two components to |
|
127 a TZID: a numeric identifier and a name identifier. </p><p><b>TZ data change |
|
128 notification</b></p><p>The Time Zone Services APIs support several Publish |
|
129 and Subscribe (P&S) properties, some of which are described below. Clients |
|
130 can attach and subscribe to these properties to allow them to be notified |
|
131 of TZ data changes.</p><p> The Calendar uses the callback API <codeph>MCalChangeCallBack2</codeph> for |
|
132 asynchronous change notification.</p><ul> |
|
133 <li><p><b>Publish and Subscribe</b> - The <codeph>NTzUpdate</codeph> namespace |
|
134 contains a property category and property keys. The property key <codeph>ETzRulesChange</codeph> is |
|
135 used to inform clients of changes to:</p><ul> |
|
136 <li><p>the system TZ database </p></li> |
|
137 <li><p>current and system TZ rules </p></li> |
|
138 <li><p>user-defined rules.</p></li> |
|
139 </ul><p>The property key <codeph>ETzNamesChange</codeph> is responsible for |
|
140 changes to the localized system TZ names and non-localized user-defined TZ |
|
141 names. </p> </li> |
|
142 <li><p><b>Alarm Server client</b> - The Alarm Server supports fixed UTC time |
|
143 and floating local time to express the expiry time of an alarm. The TZ Server |
|
144 then recalculates and sets the current UTC offset.</p><p>See <xref href="GUID-9BE3DEBE-A1CE-5A2F-9746-1E6F2B5B050E.dita">System |
|
145 Time and Locale Changes</xref>. </p></li> |
|
146 <li><p><b>Calendar client</b> - The Calendar API allows a client to be notified |
|
147 of changes to Calendar entries.</p><p>For more information, see <xref href="GUID-3987D040-27F7-5226-96AC-D578ECA4C0A2.dita">Callback |
|
148 Interfaces</xref>.</p></li> |
|
149 </ul></section> |
|
150 <section id="GUID-5102801C-87DC-4AC1-8733-F216C043A36F"><title>See also</title><ul> |
|
151 <li><p><xref href="GUID-F0C71D6E-CAF1-49CC-A697-FC1A810DF1D5.dita">Time zone services |
|
152 tutorials</xref></p></li> |
|
153 <li><p><xref href="GUID-A0E21681-F1EF-4E79-965A-040AC7D72A01.dita">Time Zone Conversion |
|
154 Overview</xref></p></li> |
|
155 </ul></section> |
|
156 </conbody></concept> |