?
Solved

Time Zone Issue in VB

Posted on 2004-08-19
5
Medium Priority
?
161 Views
Last Modified: 2010-04-17
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
Comment
Question by:KeikoWasabi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 9

Expert Comment

by:Dang123
ID: 11846095
Check thiis link for the time zone.

http://www.vbwm.com/submissions/display.asp?id=45
0
 

Author Comment

by:KeikoWasabi
ID: 11856232
That's usefull, but is there a way to check if the clock has been changed by the user?
0
 
LVL 9

Accepted Solution

by:
Dang123 earned 1000 total points
ID: 11869383
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: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Starting up a Project
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question