Displaying time of Two Countries??
-
:confused:Hi i have a Windows Application!! In which i need to Display the Time of Two Countries, For example: When the application is Loaded, i want to Display the "Local Time/System Time" and "GMT time" and "Eastern Standard Time" on the window!! In .NET there is option only for getting the current time zone!!("System.TimeZone.CurrentTimeZone"); ! Any helps or any sample codes or suggestion !! Please! Thanks in advance! One Shot dont miss you chance to go!!!!
-
:confused:Hi i have a Windows Application!! In which i need to Display the Time of Two Countries, For example: When the application is Loaded, i want to Display the "Local Time/System Time" and "GMT time" and "Eastern Standard Time" on the window!! In .NET there is option only for getting the current time zone!!("System.TimeZone.CurrentTimeZone"); ! Any helps or any sample codes or suggestion !! Please! Thanks in advance! One Shot dont miss you chance to go!!!!
-
:confused:Hi i have a Windows Application!! In which i need to Display the Time of Two Countries, For example: When the application is Loaded, i want to Display the "Local Time/System Time" and "GMT time" and "Eastern Standard Time" on the window!! In .NET there is option only for getting the current time zone!!("System.TimeZone.CurrentTimeZone"); ! Any helps or any sample codes or suggestion !! Please! Thanks in advance! One Shot dont miss you chance to go!!!!
You can do this by using the interop layer to call Win32 functions. The function GetLocalTime will give you the local system time. Calling GetSystemTime will give you the current GMT time. You then can use SystemTimeToTzSpecificLocalTime to convert GMT to Eastern Standard Time. Andy Human beings were not meant to sit in little cubicles staring at computer screens all day, filling out useless forms and listening to eight different bosses drone on about about mission statements. -- Peter Gibbons