Solved

Time Zone Issue in VB

Posted on 2004-08-19
5
154 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
  • 2
5 Comments
 
LVL 9

Expert Comment

by:Dang123
Comment Utility
Check thiis link for the time zone.

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

Author Comment

by:KeikoWasabi
Comment Utility
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 250 total points
Comment Utility
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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
factory design pattern vs abstract factoy design pattern 2 83
endX challenge 2 48
nestparen challenge 4 55
mapBully challenge 6 88
Purpose To explain how to place a textual stamp on a PDF document.  This is commonly referred to as an annotation, or possibly a watermark, but a watermark is generally different in that it is somewhat translucent.  Watermark’s may be text or graph…
Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

744 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now