Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Fox 2.6 Can DATE() be manipulated by adjusting hours? 1

Status
Not open for further replies.

jlg13

Technical User
May 10, 2001
61
US
We are running a Fox 2.6 application in Australia which is typically 14 hours ahead of East Coast, USA. We connect from USA via remote desktop and would like to adjust the date/time used by the application by subtracting 14 hours from the PC clock this working in our time zone versus Australia durng that login. Any way to do that?

Thanks
Joe
 
My inclination would be to have the application handle this rather than changing the PC clock, which just opens up the possibility of ugly issues around timestamps.

Maybe replace all use of TIME() and SECONDS() (and any other FPW functions that reflect time) with calls to custom functions. Then, set up the start-up from the remote desktop, so that it sets a flag of some sort that those functions use to make the adjustment.

Tamar
 
Thanks and apologize for delay. I did not get a notification of your post.

I know how to reduce the PC clock by month/Day and years but how do I deduct 14 hours from the PC clock to use my time zone. For example, when I log in, I want to set the time back 14 hours if login = me.
 
I imagine there's an API function you can use to change the system clock (probably the same one you use to change other aspects of the date/time). I just think it's a terrible idea since it will affect all applications running on that machine.

Tamar
 
Have you simply tried to set your timezone in system settings? I don't think this will be a per user setting, but since the API call GetSystemTime gives you unbiased UTC time (no summer/winter time DST shift), that indicates the core BIOS clock is set to UTC and just the system timezone setting transforms this to local time. So if you change timezone back the time is uneffected.

Still that influences the whole system, as timezone is not a per user setting. Perhaps it is in a remote desktop sessions, try it out with two users connecting and setting different time zones.

Bye, Olaf.



Olaf Doschke Software Engineering
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top