Click to See Complete Forum and Search --> : Time Zone


Vlad Chapranov
July 22nd, 1999, 04:09 PM
I need to update record in a Access97 db on the Central machine (Win98 network) with Date and Time of creation of the file on the same central machine, but from application running on a local machine. I'm using VB FileDateTime function with the path and name of file as an argument. Everything was fine until somebody changed the Time Zone setting on one of the local machines. Now if update is done from machine with wrong Time Zone setting FileDateTime function returns not real time of creation of the file but corrected with difference between Time Zones on two computers. Is there any way to detect difference between Time Zone settings on two computers or some other solution. For now I know the only way to create DCOM EXE, and run it on the Central computer. But I have no experience with DCOM. Thanks for any advice
Vlad

Lothar Haensler
July 23rd, 1999, 01:52 AM
you could call the NetRemoteTOD API to get the current time of the other machine. This will tell you whether there is any significant time difference between your local machine and the remote machine.
in VB 6 you can call the CreateObject method with the new parameter SERVERNAME to create a COM object on another server if you plan to use a COM object on the other server.