Utilities (TCTrkUtils.pas)
Return to Introduction  Previous page 
This file contains utility functions that may be useful in the context of the TC Tracker API. They are provided simply to make things a bit easier and are not documented in this API.

The following two functions are particularly important because all date/times are stored and returned by the API in UTC format and need to be converted on occasion.

function LocalDateToUTCDate( Date: TDateTime ): TDateTime;  
function UTCDateToLocalDate( Date: TDateTime ): TDateTime;  
 
When reading a date value using the API, it can be converted to a local TDateTime format by making the following call:

LocalDateTime := UTCDateToLocalDate( FileDateToDateTime( TrackerDate ) );  

similarly, before storing a date, it shoudl be converted to UTC using a call similar to the following:

TrackerDate := DateTimeToFileDate( LocalDateToUTCDate( LocalDateTime ) );  
 
 

 


© 1995-2018 MCN Software