Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to localize times ?
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01053085
Message ID:
01053272
Views:
8
>Hi all,
>
>I sure hope someone out there can help me with some general advise on this one :
>
>Facts :
>

    >
  • An ERP package consisting of over 9,000 business functions, date and time obviously all over the place.
    >
  • A formal "Intercompany" module, allowing one company to place orders at the other the system applying both transactions with one logical transaction.
    >
  • The system (due) runs in several different time zones, all remote users using WTS (so sifferent timezones on one WTS system)
    >

>How on earth do I approach this ?
>Of course each "PC" can have its own time zone set (already difficult enough within a Terminal Server environment).
>I can imagine one user in timezone GMT-6 placing an order at his local time 9:00am, that order arriving in the company in GMT+1 at 4:00pm. This feels right because in GTM+1 it really IS 4:00pm when in GTM-6 it really IS 9:00am.
>
>The above, however, implies that times have to be converted real-time, since the user in GTM-6 will want to see his order being there at 9:00am.
>I imagine that where i.e. the purchage order in GMT-6 - and the connected sales order in GMT+1 both MUST be in the database at a common time, e.g. the server time (let's say that that's GMT+1 in this case).
>
>I imagine that all TIME() functions, but also the retrieval of database fields must go through some MyTimeZoneFunction(), right ?
>It occurred to me that VFP has some helptekst about localizing dates and times, but that this is about the user interface only. At least there could have been a ServerTime() and a TimeZoneTime() function ...
>
>There is only 20 years fox experience here, but this one never occurred to me. I thought : in the States this is more obvious, so let's ask ... Do I miss it all ? (yes please)
>
>Thanks very much for any help !

Peter,

Windows stores file times as Universal Coordinated Time (UTC). This means that regardless of the time zone, two datetimes can be compared by using their UTCs.

I've some programming in the download section under the name Windows Time, that should help you out.
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform