HELP: getting Greenwich Mean Time 
Author Message
 HELP: getting Greenwich Mean Time

Is there a function or API calls that I can make to get the GMT Time?
I don't want to hardcode TimeDiff to get GMT.  Is there a way to get
GMT no matter what timezone your workstation is set at?  Thanks in
advance...


Tue, 10 Sep 2002 03:00:00 GMT  
 HELP: getting Greenwich Mean Time

?Is there a function or API calls that I can make to get the GMT Time?
?I don't want to hardcode TimeDiff to get GMT.  Is there a way to get
?GMT no matter what timezone your workstation is set at?  Thanks in
?advance...

==========
Option Explicit

Private Type SYSTEMTIME
   wYear As Integer
   wMonth As Integer
   wDayOfWeek As Integer
   wDay As Integer
   wHour As Integer
   wMinute As Integer
   wSecond As Integer
   wMilliseconds As Integer
End Type

Private Declare Sub GetSystemTime Lib "kernel32" _
   (lpSystemTime As SYSTEMTIME)
Private Declare Function SystemTimeToVariantTime Lib "oleaut32.dll" _
   (lpSystemTime As SYSTEMTIME, lpFileTime As Date) As Long

Private Sub Command1_Click()
   Dim st As SYSTEMTIME
   Dim dt As Date
   Call GetSystemTime(st)
   Call SystemTimeToVariantTime(st, dt)
   Beep
   MsgBox "At the tone the time was" & vbCrLf & dt & " GMT"
End Sub
==========

--
Paul Marshall



Tue, 10 Sep 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Greenwich Mean Time

2. how to calculate the GMT (greenwich mean time)

3. Converting Greenwich Mean Time

4. Greenwich Mean Time

5. Converting Greenwich Mean Time

6. Convert Greenwich Mean Time to EST

7. How to Convert GMT(Greenwich) Time to short date and time and vice versa

8. How Can I Obtain Greenwich Mean Time in VB?

9. Urgent!! Greenwich Mean Time?

10. I am getting duplicate records, I mean everything is duplicate even Access record number

11. getting run-time behavior of a contained control in a user control at design time

12. help getting time from bios!

 

 
Powered by phpBB® Forum Software