![](../../../Home/Icons/Home.gif)
![](../icons/UpBook.gif)
![](../icons/BookContext.gif)
![](../../../Home/Icons/Search.gif)
![](../../../Home/Icons/Help.gif)
![](../../icons/button_contents.gif)
![](../../icons/button_previous.gif)
How time is converted
TDateTimeFormatter uses the classes TTimeZone and TCalendar to provide the correct formatting for a particular locale. When a TDateTimeFormatter receives UTC time data, it goes through the following steps to convert it to a meaningful local time and date:
- Converts the TTime instance containing the UTC time to a TTime instance containing the local time, using the current TTimeZone.
- Maps the local time to a set of calendar fields (for example, month, date, and year) using the current TCalendar.
- Creates text output according to the requested pattern.
![](TT109FOR.DOC_AFrame_50.gif)
TDateTimeFormatter and TCalendar are abstract classes. Specific derived classes work together in pairs to provide the correct formatting for a particular calendaring system. The classes TGregorianDateTimeFormatter and TGregorianCalendar provide formatting for the Gregorian calendar used in many parts of the world. You can derive your own classes from TDateTimeFormatter and TCalendar to provide support for other calendaring systems. See "Creating a date and time formatter" on page 255 for more information.
[Contents]
[Previous]
[Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.
Generated with WebMaker