×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

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

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

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

(OP)
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

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

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

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

(OP)
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.

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

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

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

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
https://www.doschke.name

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close