Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Modify file's timestamp
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00278899
Message ID:
00279033
Vues:
15
>>>Thanks, Rick. I was just in the process of figuring out what the heck was going on.
>>>
>>>This is going to turn out to be a major PITA. What a stupid implementaion of the function.
>>>
>>>If I write the current time to a file, it writes:
>>>
>>>File time 10/20/99 08:41:50 AM
>>>What I meant to write: 10/20/99 01:41:50 PM
>>
>>Erik,
>>
>>Since I sent you down what appears to be a bad path, want me to post some code that will do this right?
>
>Well, it does it right, but the functionality looks to be more "politically correct" than I am really after. Though this app will be communicating across time zones, I don't really care to make a file's age relative to the local machine, I want to make equal to the time on a corresponding server file. It looks like I can do it by grabbing the ActiveTimeBias from the registry and converting from it's DWORD to a minute offset, but I would rather not if I don't have to.
>
>So- you have more tricks up your sleeve?

Short of calling GetTimeZoneInformation(), no. Converting those values may be more trouble than getting the info from the registry. What you have to do, is determine the normal bias, the starting and ending dates of day light savings time if appropriate, and adjust the time with the daylight bias. I've done all this, but given the choice between this and Foxtools with getting the information from the registry, and interfacing with the API calls (which will adjust it automatically) to set the time, I'd choose the latter. If only for the reason I don't like goofing around with the registry. Of course, that's just me.
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform