[AccessD] Comparing times in different time zones

Stuart McLachlan stuart at lexacorp.com.pg
Mon Oct 24 23:13:26 CDT 2011


You need to store all the times as  FileTime or Unix Time.

Storing as FileTime lets you use the API calls 

    FileTimeToSystemTime
    SystemTimeToTzSpecificLocalTime
    SystemTimeToFileTime

to get local times as required.

If you want to use UnixTime instead, then

UnixTime = FileTime/10000000 - 11644473600 

-- 
Stuart

On 24 Oct 2011 at 22:13, Kenneth W Van Huss wrote:

> I have an unmet challenge relating to comparing times in different
> time zones.  User on the other side of the world, literally enters
> time of an event.  When the user saves the record in the database that
> time is captured, though the time is the server time, located in US
> central time zone.  Using UTC offset I have "normalized" the times to
> UTC to compare against one another to ensure the record was entered
> within a certain amount of time.  The challenge I see down the road is
> Day Light Savings time and the impact that will have on the offset. 
> Anyone experience this before?
> 
> 
> 
> Thanks!
> 
> Ken
> 
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 






More information about the AccessD mailing list