Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adir() and daylight saving
Message
From
09/11/2022 12:21:00
 
 
To
09/11/2022 08:25:19
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
01685270
Message ID:
01685273
Views:
44
>Hi!
>
>I've developed a Tool, that looks in some Directories and stores Filenames and Dates (result of adir()) in an Table.
>If one File changes, i set a Flag and some other Stuff follows...
>
>Well now the daylight Saving Time in Germany has ended.
>And WOW adir() now say's every File has a changed fileTime. (1 hour).
>WTF? adir() why are you so stupid?
>Any suggestions to solve this wired stuff?

Jörg,

Other than what Martina and Tore already suggested, and to continue to base your code on ADIR(), you may consider using the UTCDatetime library at https://github.com/atlopes/UTCDatetime to convert local datetime values into UTC.

To prepare:
DO LOCFILE("utc.app")
_Screen.Utc.SetTimezone("Europe/Berlin")
When you need to insert a datetime into your table, insert it as UTC. After grabbing the datetime value from columns 3 and 4 of the ADIR() array, instead of
..., m.FileDatetime, ...
use
..., _Screen.Utc.UTCTime(m.FileDatetime), ...
----------------------------------
António Tavares Lopes
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform