This issue is addressed on the Base Class Libraries community site, at
http://www.gotdotnet.com/team/clr/bcl/TechArticles/techarticles/DateTimeFAQ/
FAQ.aspx
====
Does the .NET Framework support Time Zone conversions to any given Time
Zone?
Not in V1.0, V1.1 or the Whidbey pre-release.
The .NET Framework does support conversion to and from UTC and the systems
current local time. It can also support parsing a DateTime from an
arbitrary time zone offset, such as 2003-10-26T13:11:07+10:00, but it must
always convert this either to Local or UTC.
This is a very common feature request and is likely to be in a future
version.
People are often surprised why this feature cannot be supplied by Microsoft
at low cost. In particular, data to do conversions exists in the Windows
registry and is used by the time zone selection dialog. However, there is a
big distinction between having UI and registry data and having an API.
This is a more expensive feature to undertake for Microsoft than most
people would imagine because (a) an API must provide consistent behavior
from one machine to another so we cant just re-expose the registry data and
(b) there is cost for Microsoft in exposing an official Time Zone
conversion because we face on-going geo-political costs for any
country/region based data we gather and maintain. For example, a country
may threaten to boycott our product if they are not listed in the data.
This has happened to us with our CultureInfo data on many occasions, and we
often need to tweak data in service packs, which is expensive and risky.
That being said, there is agreement that this is a very important feature,
and it is under serious consideration for the WinFx release.
====
Katy King
CLR BCL Test
|From: "Nicholas Paldino [.NET/C# MVP]" <
[email protected]>
| Larry,
|
| I haven't seen any documentation released that indicates that this is
| the case. However, there are MS employees that are monitoring these
| newsgroups, as well as have comment sections in their personal blogs (the
| links of which can be found on msdn.microsoft.com), so if you voice your
| concerns, then someone might be listening...
|
|
| --
| - Nicholas Paldino [.NET/C# MVP]
| - (e-mail address removed)
|
| | > Nicholas,
| >
| > Thanks for the answer. I was afraid of that. I looked over the classes
| and could not determine which one to use.
| >
| > Is Microsoft planning to add this in .NET 2.0 ?
| >
| > -Larry
| >
| > ----- Nicholas Paldino [.NET/C# MVP] wrote: -----
| >
| > Larry,
| >
| > You are going to have to do this yourself. Unfortunately, you
| can only
| > get the TimeZone instance that corresponds to the current system
time
| zone,
| > not any others (which is foolish in my opinion). You will have to
| keep a
| > table of timezones as well as the offsets, and then adjust your
date
| time
| > instance accordingly.
| >
| > Hopet this helps.
| >
| >
| > --
| > - Nicholas Paldino [.NET/C# MVP]
| > - (e-mail address removed)
| >
| > | > > I would like to know the date and time in another time zone, but
I
| cannot
| > figure out how to do it. For example, I have a DateTime in UTC
that
| is
| > 23:00, which is 18:00 EDT. I would like to know the time in the
PDT
| > timezone. Does anyone know which class I should use to do the
| conversion?
| >
| >
| >
|
|
|