Symbian3/PDK/Source/GUID-B002BA13-38FA-590C-A1A9-336867BBFDBE.dita
changeset 5 f345bda72bc4
parent 3 46218c8b8afa
child 9 59758314f811
equal deleted inserted replaced
4:4816d766a08a 5:f345bda72bc4
     7     Nokia Corporation - initial contribution.
     7     Nokia Corporation - initial contribution.
     8 Contributors: 
     8 Contributors: 
     9 -->
     9 -->
    10 <!DOCTYPE concept
    10 <!DOCTYPE concept
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
    12 <concept id="GUID-B002BA13-38FA-590C-A1A9-336867BBFDBE" xml:lang="en"><title>timezonelocalization:
    12 <concept id="GUID-B002BA13-38FA-590C-A1A9-336867BBFDBE" xml:lang="en"><title>S60
    13 Time Zone Localization example</title><prolog><metadata><keywords/></metadata></prolog><conbody>
    13 Platform: Time Zone Localiser Example</title><prolog><metadata><keywords/></metadata></prolog><conbody>
    14 <section><title>Download</title> <p>Click on the following link
    14 <section id="GUID-D8C541B3-4720-4EA2-8D6A-32B4513F23C6"><title>Download</title> <p>Click
    15 to download the example: <xref href="guid-6013a680-57f9-415b-8851-c4fa63356636/zips/guid-f9f2a7c6-8e13-4308-851d-64fbec0736e4.zip" scope="external"> TZLocExample.zip</xref></p><p>Click: <xref href="guid-6013a680-57f9-415b-8851-c4fa63356636/guid-f9f2a7c6-8e13-4308-851d-64fbec0736e4.html" scope="peer">browse</xref> to view the example code. </p> </section>
    15 on the following link to download the example: <xref href="guid-6013a680-57f9-415b-8851-c4fa63356636/zips/guid-f9f2a7c6-8e13-4308-851d-64fbec0736e4.zip" scope="external"> TZLocExample.zip</xref></p><p>Click: <xref href="guid-6013a680-57f9-415b-8851-c4fa63356636/guid-f9f2a7c6-8e13-4308-851d-64fbec0736e4.html" scope="peer">browse</xref> to view the example code. </p> </section>
    16 <section><title> Description</title> <p>This example demonstrates the Time
    16 <section id="GUID-DA0070DE-E5B3-4B65-80DD-7BC6455BFDD6"><title> Description</title> This
    17 Zone Localization API. The purpose of the API is to provide access to the
    17 C++ code example demonstrates how to convert UTC time to local time using
    18 localizable names of time zones, cities and city groups. </p> <p>It first
    18 the time zone server (RTz) and how to add, remove, or find a city in the database
    19 creates an instance of <xref href="GUID-18853D2C-A730-38CD-AA3D-3B1F4E891950.dita"><apiname>CTzLocalizer</apiname></xref>, which is the interface
    19 using the TZLocalizer API, introduced in Symbian OS v.9.1 (S60 3rd Edition).
    20 to the localized time zone and city name information. Note that <codeph>ReadUserData</codeph> and <codeph>WriteUserData</codeph> capabilities
    20 The updated example has been tested to support S60 5th Edition and touch UI.
    21 are needed to instantiate class <xref href="GUID-18853D2C-A730-38CD-AA3D-3B1F4E891950.dita"><apiname>CTzLocalizer</apiname></xref>. <xref href="GUID-18853D2C-A730-38CD-AA3D-3B1F4E891950.dita"><apiname>CTzLocalizer</apiname></xref> is
    21 Main classes: RTz, CTzLocalizer. For more information, look into this link <xref href="http://www.forum.nokia.com/info/sw.nokia.com/id/46d7f03e-2275-40c7-b72c-3d2c74e105e6/S60_Platform_Time_Zone_Localiser_Example.html" scope="external">Time Zone Localizer</xref></section>
    22 used to retrieve and display a list of all available localized time zone names
       
    23 (contained in a <xref href="GUID-77031C53-5BB3-3022-B03C-8D3EAFFCFB78.dita"><apiname>CTzLocalizedTimeZoneArray</apiname></xref>). The array is
       
    24 sorted by standard name (<xref href="GUID-18853D2C-A730-38CD-AA3D-3B1F4E891950.dita#GUID-18853D2C-A730-38CD-AA3D-3B1F4E891950/GUID-C89F7E6F-4470-342A-962A-D8ABF24B6F6F"><apiname>CTzLocalizer::ETzAlphaStandardNameAscending</apiname></xref>)
       
    25 but could be sorted in various other ways, for instance by UTC offset. </p> <p>Each
       
    26 localized time zone (<xref href="GUID-35BC25A8-ED6D-36A1-8D28-3BA278AD84FE.dita"><apiname>CTzLocalizedTimeZone</apiname></xref>) is identified
       
    27 by a numeric ID, and has up to four names: a standard name, a short standard
       
    28 name, a daylight savings (DST) name and short DST name. Localized time zone
       
    29 information is defined in language-specific resource files installed in the
       
    30 ROM, each of which contains the time zone names and city names translated
       
    31 into the appropriate language. <xref href="GUID-18853D2C-A730-38CD-AA3D-3B1F4E891950.dita"><apiname>CTzLocalizer</apiname></xref> reads the resources
       
    32 from the appropriate resource file for the system's current language setting. </p> <p>The
       
    33 example then adds a new city to a time zone and city group using <xref href="GUID-18853D2C-A730-38CD-AA3D-3B1F4E891950.dita#GUID-18853D2C-A730-38CD-AA3D-3B1F4E891950/GUID-FB27B31A-DCA9-31CB-A051-F6135B91F353"><apiname>CTzLocalizer::AddCityL()</apiname></xref>.
       
    34 It first checks that the city has not already been added, (no two cities with
       
    35 the same name can be in the same time zone). The cities in a time zone are
       
    36 a combination of static data, stored in the time zone resource files in ROM,
       
    37 and user defined data, stored separately, in a database. However, the location
       
    38 of the data is hidden from users of the API. </p> <p>City groups (<xref href="GUID-8BA1973D-91DF-382B-BB73-07AE2FEFA0B7.dita"><apiname>CTzLocalizedCityGroup</apiname></xref>)
       
    39 are an optional way of grouping cities other than by time zone. Each city
       
    40 group has an ID and a name. As city group names are localizable, they are
       
    41 also defined in language-specific resource files in the ROM. </p> <p>The example
       
    42 displays all cities in the chosen time zone (using <xref href="GUID-18853D2C-A730-38CD-AA3D-3B1F4E891950.dita#GUID-18853D2C-A730-38CD-AA3D-3B1F4E891950/GUID-710B9CB0-894E-3862-ADA9-E533621E676E"><apiname>CTzLocalizer::GetCitiesL()</apiname></xref>)
       
    43 and all cities in the chosen city group (using <xref href="GUID-18853D2C-A730-38CD-AA3D-3B1F4E891950.dita#GUID-18853D2C-A730-38CD-AA3D-3B1F4E891950/GUID-D289CB62-683F-3E52-94A5-ACCF58D4D2CA"><apiname>CTzLocalizer::GetCitiesInGroupL()</apiname></xref>). </p> </section>
       
    44 <section><title>Usage</title><p> This is a console application, so does not
       
    45 have a GUI. It builds an executable called <filepath>TzLocExample.exe</filepath> in
       
    46 the standard location (<filepath>\epoc32\release\winscw</filepath>\&lt;build_variant&gt;
       
    47 for codewarrior). The Symbian OS build process describes how to build this
       
    48 application. After launching the executable, depending on the emulator you
       
    49 are using, you may need to task away from the app launcher/shell screen to
       
    50 view the console.</p> </section>
       
    51 <section><title>Class Summary</title><p> <xref href="GUID-18853D2C-A730-38CD-AA3D-3B1F4E891950.dita"><apiname>CTzLocalizer</apiname></xref> </p><p> <xref href="GUID-EA9E57AA-D0B8-377E-B52D-A4AE645B8A12.dita"><apiname>CTzLocalizedCity</apiname></xref>  </p><p><xref href="GUID-52662291-BC7B-385D-A338-9AA97FD7E242.dita"><apiname>CTzLocalizedCityArray</apiname></xref>  </p><p><xref href="GUID-8BA1973D-91DF-382B-BB73-07AE2FEFA0B7.dita"><apiname>CTzLocalizedCityGroup</apiname></xref> </p><p> <xref href="GUID-ECFB8BAC-05EB-300F-A178-43CB5DF3A388.dita"><apiname>CTzLocalizedCityGroupArray</apiname></xref> </p><p> <xref href="GUID-35BC25A8-ED6D-36A1-8D28-3BA278AD84FE.dita"><apiname>CTzLocalizedTimeZone</apiname></xref></p><p>  <xref href="GUID-77031C53-5BB3-3022-B03C-8D3EAFFCFB78.dita"><apiname>CTzLocalizedTimeZoneArray</apiname></xref>  </p></section>
       
    52 </conbody></concept>
    22 </conbody></concept>