Symbian3/SDK/Source/GUID-CD506806-FC59-547A-B5CD-03314DF847F7.dita
changeset 0 89d6a7a84779
child 13 48780e181b38
equal deleted inserted replaced
-1:000000000000 0:89d6a7a84779
       
     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-CD506806-FC59-547A-B5CD-03314DF847F7" xml:lang="en"><title>Date And
       
    13 Time Handling Overview</title><shortdesc>Functions that manipulates date and time values. </shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
       
    14 <section id="GUID-C9F67EE0-BDA3-43B7-A0D5-D68CEAE58E0E"><title>Architectural relationships</title> <p>The system maintains
       
    15 two clocks: </p> <ul>
       
    16 <li id="GUID-3C5A5819-E800-518A-A8D9-8B6BEB52F0D1"><p>a secure clock that
       
    17 can only be set by kernel code or by an application that has TCB capability.
       
    18 This is a clock that can be used by secure DRM applications. </p> </li>
       
    19 <li id="GUID-44375F26-F8E9-54AA-9F20-E0B74C7F905D"><p>a non-secure clock that
       
    20 can be set by applications that require no specific capability. This is the
       
    21 clock that is used for user-visible time displays. </p> </li>
       
    22 </ul> <p>The non-secure clock is implemented in terms of an offset from the
       
    23 secure clock. </p> <p>Both the secure time and the non-secure time can be
       
    24 set using the System Static Functions API, and specifically: </p> </section>
       
    25 <section id="GUID-2F364328-2127-4225-98A8-8F706E4B7BC7"><title>Secure time </title> <ul>
       
    26 <li id="GUID-FF13C20D-505B-55B0-B95C-1D64AF9A81E6"><p> <xref href="GUID-C197C9A7-EA05-3F24-9854-542E984C612D.dita#GUID-C197C9A7-EA05-3F24-9854-542E984C612D/GUID-914FC88A-2D71-321B-8501-C7B91D142586"><apiname>User::SetHomeTimeSecure(0</apiname></xref> </p> </li>
       
    27 <li id="GUID-6163CCC9-0C88-50B0-895B-6D781D389C49"><p> <xref href="GUID-C197C9A7-EA05-3F24-9854-542E984C612D.dita#GUID-C197C9A7-EA05-3F24-9854-542E984C612D/GUID-B25BB967-380B-3A40-AD1B-53775C3335D7"><apiname>User::SetUTCTimeSecure()</apiname></xref> </p> </li>
       
    28 </ul> </section>
       
    29 <section id="GUID-81367F49-79D7-45C9-91CD-1A327EB71DF7"><title>Non-secure time </title><ul>
       
    30 <li id="GUID-BA9D3823-219E-5C21-89A5-8239F97349A0"><p> <xref href="GUID-C197C9A7-EA05-3F24-9854-542E984C612D.dita#GUID-C197C9A7-EA05-3F24-9854-542E984C612D/GUID-95B49BD6-AAD8-3AEB-88A2-DD7E934AFAB6"><apiname>User::SetHomeTime()</apiname></xref> </p> </li>
       
    31 <li id="GUID-E9AAE71D-29CD-530E-8F3E-F4B3BA55854C"><p> <xref href="GUID-C197C9A7-EA05-3F24-9854-542E984C612D.dita#GUID-C197C9A7-EA05-3F24-9854-542E984C612D/GUID-145F52E6-2A29-3FF1-8AD1-7009BE0074D7"><apiname>User::SetUTCTime()</apiname></xref> </p> </li>
       
    32 </ul> <p>System locale settings, which affect date and time formatting, are
       
    33 set through <xref href="GUID-53299759-C2DD-3ABC-A055-9AFE7C5081C6.dita"><apiname>TLocale</apiname></xref> in the Locale Settings API. </p> </section>
       
    34 <section id="GUID-6F1F1A03-5336-4246-8EF7-602172A8E91B"><title>Description</title> <p>The API has three key concepts: point
       
    35 in time, time utilities, and time interval. </p> <p><b>Point
       
    36 in time</b> </p> <p>The point in time is a 64-bit integer that represents
       
    37 time as the number of microseconds since midnight on 1st January 0 AD, using
       
    38 a nominal Gregorian calendar. It can be set to the current system time, can
       
    39 have arithmetic and comparison operations performed on it, and can be converted
       
    40 into a string formatted according to the locale and other options. </p> <p>The
       
    41 main point in time interface is provided by <xref href="GUID-A2D3BA72-9B27-3BFF-950A-D7E3B2004821.dita"><apiname>TTime</apiname></xref>. A support
       
    42 class <xref href="GUID-13A9DD2B-8ABC-3D62-B54E-4F5DD5B9228B.dita"><apiname>TDateTime</apiname></xref> is provided that allows time values to
       
    43 be get and set in an easy-to-use format, such as year, month, day, rather
       
    44 than as an integer. </p> <p>The time value in a <codeph>TTime</codeph> object
       
    45 can be set using either the secure time or the non-secure time. </p> <p><b>Time utilities</b> </p> <p>The time utilities provides miscellaneous time
       
    46 functions, for such things as checking for leap years. </p> <p>The time utilities
       
    47 interface is provided by <xref href="GUID-B81A50BE-2045-3040-A5DD-D5DE03B52FCC.dita"><apiname>Time</apiname></xref>. </p> <p><b>Time interval</b> </p> <p>The time interval represents a period between
       
    48 two points in time. Time intervals can be added or subtracted, either to or
       
    49 from each other or to or from points in time. </p> <p>The time interval interface
       
    50 is provided by a base class <xref href="GUID-A5F9B2F0-6FCF-336E-95C6-9CE3EDFE4FD1.dita"><apiname>TTimeIntervalBase</apiname></xref> and by a
       
    51 family of derived classes for second, minute, hour, etc. intervals. A class
       
    52 outside this hierarchy, <xref href="GUID-B7D6F874-1ABD-3AC6-9329-19DC54C12F18.dita"><apiname>TTimeIntervalMicroSeconds</apiname></xref>, is provided
       
    53 for efficiency reasons (it alone stores its value as a 64-bit number). </p> </section>
       
    54 </conbody><related-links>
       
    55 <link>
       
    56 <desc><xref href="GUID-92C032CF-9291-5970-9152-EFF47C9AE3B9.dita">Locale Settings
       
    57 Overview</xref></desc>
       
    58 </link>
       
    59 <link href="GUID-FF8F5D97-7D37-5F6B-84A3-C064E2FD53E0.dita"><linktext>System Static
       
    60 Functions Overview</linktext></link>
       
    61 </related-links></concept>