[Standards-JIG] Communicating timezone information

Chris Mullins chris.mullins at coversant.net
Thu Aug 24 21:34:58 CDT 2006


Maciek Niedzielski Wrote:

> I'm looking for a way to communicate timezone information.
> 1. JEP-0090 (jabber:iq:time) sends current time in... UTC.

I know in our SDK, we populate the <tz/> element with the following
code:
_tz = System.TimeZone.CurrentTimeZone.StandardName;

This looks all well and good, but (to my surprise) when I looked to see
how the code parsed this back into a .Net DateTime, I see:

//*** It's a shame TimeZone objects aren't properly supported in .NET. 
return new System.DateTime(year, Month, Day, Hour, Minute, Second);

... so yea, a better date time format is needed. 

I don't see why we don't use the standard Xml time format here. 

(A quick gander through the .Net 2.0 framework shows that although I can
get the standard name for the current timezone, there's no way to
construct a TimeZone instance from one of these standard names. This
seems more than a little bit retarded.)

--
Chris Mullins
http://www.coversant.net/blogs/cmullins




More information about the Standards-JIG mailing list