Converting Greenwich Mean Time 
Author Message
 Converting Greenwich Mean Time

I need help with the conversion of "Greenwich Mean Time" to Eastern
time? Any sample functions would be great!



Thu, 02 Sep 1999 03:00:00 GMT  
 Converting Greenwich Mean Time

Quote:

>I need help with the conversion of "Greenwich Mean Time" to Eastern
>time? Any sample functions would be great!

The API will do this. I *think* the relevant function names are
SystemTimeToLocalTime and LocalTimeToSystemTime. You could also
just subtract the appropriate number of hours depending on the
time zone.

Joe

Never underestimate the power of a WAG.

http://www.citilink.com/~jgarrick/vbasic/



Thu, 02 Sep 1999 03:00:00 GMT  
 Converting Greenwich Mean Time

Joe

Thanks for the info, I did get it to work using VB code and some luck.



Quote:

> >I need help with the conversion of "Greenwich Mean Time" to Eastern
> >time? Any sample functions would be great!

> The API will do this. I *think* the relevant function names are
> SystemTimeToLocalTime and LocalTimeToSystemTime. You could also
> just subtract the appropriate number of hours depending on the
> time zone.

> Joe

> Never underestimate the power of a WAG.

> http://www.citilink.com/~jgarrick/vbasic/



Sun, 05 Sep 1999 03:00:00 GMT  
 Converting Greenwich Mean Time

Quote:

> I need help with the conversion of "Greenwich Mean Time" to Eastern
> time? Any sample functions would be great!

Andrew, it is 5 hours during EST and 4 hours during EDT.  I suppose you
are aware of the GetSystemTime (GMT) and GetLocalTime(Local Time) API
calls?  

Private Declare Sub GetSystemTime Lib "kernel32" (lpSystemTime As
SYSTEMTIME)

Private Declare Function GetTimeZoneInformation Lib "kernel32"
(lpTimeZoneInformation As TIME_ZONE_INFORMATION) As Long

Private Declare Function SetTimeZoneInformation Lib "kernel32"
(lpTimeZoneInformation As TIME_ZONE_INFORMATION) As Long

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 Type TIME_ZONE_INFORMATION
        Bias As Long
        StandardName(32) As Integer
        StandardDate As SYSTEMTIME
        StandardBias As Long
        DaylightName(32) As Integer
        DaylightDate As SYSTEMTIME
        DaylightBias As Long
End Type

private gmtDT as SYSTEMTIME
private localDT as SYSTEMTIME
private timeZone as TIME_ZONE_INFORMATION

private function cvtGmt2LocalTime(GMT as date) as date
    'Use the VB Datediff function to give you the local time.
    'If you are in EASTERN time zone, this is straightforward
    'If you're in another TIME zone, you see where i'm going I hope.
    '
    ' GetSystemTime fills your structure with GMT stuff.
    ' GetLocalTime fills your structure with Local stuff.
    '
end function

Havagud1,

Ron



Wed, 15 Sep 1999 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Converting Greenwich Mean Time

2. Convert Greenwich Mean Time to EST

3. Greenwich Mean Time

4. HELP: getting Greenwich Mean Time

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

6. Greenwich Mean Time

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. Looking for a function to convert from numeric values to a string-detail meaning

11. help how to convert time string into time format

12. converting PST/PDT time to GMT time

 

 
Powered by phpBB® Forum Software