Thread: Time & Date
View Single Post
  #9  
Old 04-08-2010, 08:51 AM
c4esar c4esar is offline
Member
 
Join Date: Mar 2009
Location: Germany
Posts: 41
Default

Hi!
I just tested your code and the clocks are 2 hours behind the local time here in Germany. I suppose it's Greenwich-time, so your clocks actually aren't two hours forward, but ten hours behind Sidney.

But when I replace GetSystemTime with GetLocalTime it works fine.

You could remove the code-lines in the init-Section of your form, you don't need them.

To access all the different TimeZones there are two ways:
#1) there's a GetSystemTimeZones-function, but I can't figure out how to use it - perhaps Nicknack or kornalius can help you with that
#2) there are free TimeZone-Databases at http://www.twinsun.com/tz/tz-link.htm ..you could simply use one of them with a textfile or a SQLite-Database.
#3)there's a list of the Windows TimeZone-Indexes at http://msdn.microsoft.com/en-us/library/ms912053.aspx
and a very helpful article at http://blogs.msdn.com/bclteam/archiv...josh-free.aspx


greetings, c4esar

Last edited by c4esar; 04-08-2010 at 03:34 PM.
Reply With Quote