• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 163
  • Last Modified:

Time Zone Issue in VB

Hi Everyone!

I have a problem in my VB application.  Is there any way that I can check the local machine's time zone using VB?  And Is there any way that I can check if the time clock has been changed by the user?

Thanks!
Lina
0
KeikoWasabi
Asked:
KeikoWasabi
  • 2
1 Solution
 
Dang123Commented:
Check thiis link for the time zone.

http://www.vbwm.com/submissions/display.asp?id=45
0
 
KeikoWasabiAuthor Commented:
That's usefull, but is there a way to check if the clock has been changed by the user?
0
 
Dang123Commented:
KeikoWasabi,
    I can think of only two ways to accomplish that.

1. You program is in the computer startup and watches the clock once every minute or so.

2. If your program has access to the internet, remember the offset that the system clock is from one of the atomic clocks that act as a Network Time Protocol (NTP) server. Each time you want to check if the system has been changed, query the atomic clock and see if the system is still the same amount off from it, (or you can synchronize the clock for the user)

For the code look here:
http://www.thescarms.com/vbasic/syncclock.asp

For some servers look here
http://www.eecis.udel.edu/~mills/ntp/servers.html

Dang123





0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now