Obtain Time Zone 
Author Message
 Obtain Time Zone

How do I obtain the hour offset (from GMT) / time zone from the user's system?  Thanks!  -Noah



Mon, 09 May 2005 22:02:34 GMT  
 Obtain Time Zone
Noah,

    You can get the TimeZone instance that represents the current time zone
by calling the static CurrentTimeZone property on the TimeZone class.  Once
you have this, you can call the GetUtcOffset on the instance returned and it
will give you the offset from GMT.

    Hope this helps.

--
               - Nicholas Paldino [.NET/C# MVP]


How do I obtain the hour offset (from GMT) / time zone from the user's
system?  Thanks!  -Noah



Mon, 09 May 2005 22:11:09 GMT  
 Obtain Time Zone
Nicholas,

I think he means on the client in an ASP.NET web application.

Noah,

I don't believe it's possible. You can only get the timezone
on the web server.

-c



Quote:
> Noah,

>     You can get the TimeZone instance that represents the current time
zone
> by calling the static CurrentTimeZone property on the TimeZone class.
Once
> you have this, you can call the GetUtcOffset on the instance returned
and it
> will give you the offset from GMT.

>     Hope this helps.

> --
>                - Nicholas Paldino [.NET/C# MVP]



> How do I obtain the hour offset (from GMT) / time zone from the user's
> system?  Thanks!  -Noah



Tue, 10 May 2005 04:27:34 GMT  
 Obtain Time Zone
Nicholas was correct, I just needed the TimeZone on the local computer.  But
thanks for the additional information.

Cheers,
-Noah


Quote:
> Nicholas,

> I think he means on the client in an ASP.NET web application.

> Noah,

> I don't believe it's possible. You can only get the timezone
> on the web server.

> -c



> > Noah,

> >     You can get the TimeZone instance that represents the current time
> zone
> > by calling the static CurrentTimeZone property on the TimeZone class.
> Once
> > you have this, you can call the GetUtcOffset on the instance returned
> and it
> > will give you the offset from GMT.

> >     Hope this helps.

> > --
> >                - Nicholas Paldino [.NET/C# MVP]



> > How do I obtain the hour offset (from GMT) / time zone from the user's
> > system?  Thanks!  -Noah



Sun, 15 May 2005 04:46:33 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. How to convert local time with specific time zone to UTC time in Win32 API

2. How to convert local time to gmt using a local variable time zone per process/thread

3. set date/time/time zone dialog

4. Real time From Time Zone information

5. How to obtain the login time and the idle time of the user

6. how to obtain the login time and the idle time of the users

7. Getting time zone information?

8. Time Zones

9. How to maintain TimeStamp consistency across Time Zones?

10. Dataset DateTime column value affected by time zone setting

11. Need time zone conversion routine/program/function that is callable, pcumming

12. localtime() / time zone question

 

 
Powered by phpBB® Forum Software