System.TimeZone?

P

Patrick Bates

Apparently this isn't what I thought it was...

I'm looking for the following functionality:
1) Enumeration of a list of time zones
2) Configure an object based on a selected time zone
3) Use that object to convert times in GMT/UTC to the selected time zone.

If I understand correctly, System.TimeZone only performs #3 in regards to
the current system time zone, and there's no way to declare an instance as a
different time zone, much less get a list of time zones.

Seems there may be something close to what I'm looking for in SQL
Notification Services, but isn't there anything else in just .Net 2.0?

Thanks,
Patrick Bates
 
L

Larry Lard

Patrick said:
Apparently this isn't what I thought it was...

I'm looking for the following functionality:
1) Enumeration of a list of time zones
2) Configure an object based on a selected time zone
3) Use that object to convert times in GMT/UTC to the selected time zone.

If I understand correctly, System.TimeZone only performs #3 in regards to
the current system time zone, and there's no way to declare an instance as a
different time zone, much less get a list of time zones.

Seems there may be something close to what I'm looking for in SQL
Notification Services, but isn't there anything else in just .Net 2.0?

That's all I could find from a quick look around also. These people will
sell you a component, or at the very least you could 'borrow' their UI
ideas...

<http://www.componentspace.com/timezonepicker.net.aspx>
 
P

Patrick Bates

Larry Lard said:
That's all I could find from a quick look around also. These people will
sell you a component, or at the very least you could 'borrow' their UI
ideas...

<http://www.componentspace.com/timezonepicker.net.aspx>


Thanks for that link, but I did some digging on Google and eventually came
up with this:

http://www.michaelbrumm.com/simpletimezone.html

We're testing it now, and so far it appears to be very well thought out.
Using both the DLLs provided, we were able to populate a combo box with just
the names of the time zones supported by the OS, and with another function
take that string and use it to create a SimpleTimeZone object of that time
zone.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top