Thanks for your respone Param,
As for .NET 2.0, of course the DateTime type has greatly enchanged. The
.NET 2.0 DateTime class support a DateTimeKind property which help specify
whether the datetime object is representing a local time, UTC time or
unspecified....
So for local and utc time, the default xmlserliazation output will like
below:
local now:
<dateTime>2005-11-10T13:50:52.5979344-08:00</dateTime>
utc now:
<dateTime>2005-11-10T21:50:52.5979344Z</dateTime>
so we can see for UTC time it no longer append the unused TimeZone offset.
However, since the milliseconds is necessary for precise purpose, it is
still appended. So for you scenario, we should use the DateTime Formatting
flag to manually do the formatting so as to get the output we want.
Thanks,
Steven Cheng
Microsoft Online Support

Signature
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| From: <param@community.nospam>
| References: <umrT5mH5FHA.3980@TK2MSFTNGP10.phx.gbl>
<aLYkSZP5FHA.832@TK2MSFTNGXA02.phx.gbl>
| Subject: Re: datetime format in xml
| Date: Wed, 9 Nov 2005 08:51:51 -0600
[quoted text clipped - 9 lines]
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP14.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet.webservices:30825
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
|
[quoted text clipped - 27 lines]
| >
| > #Standard DateTime Format Strings Output Examples
http://msdn.microsoft.com/library/en-us/cpguide/html/cpconstandarddatetimefo
| > rmatstringsoutputexample.asp?frame=true
| >
| > Also, another msdn article discussing on the best practice using DateTime
| > in .net 1.x application:
| >
| > #Coding Best Practices Using DateTime in the .NET Framework
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/ht
| > ml/datetimecode.asp
| >
[quoted text clipped - 41 lines]
| > |
| > | TIA!
Steven Cheng[MSFT] - 14 Nov 2005 14:27 GMT
Hi Param,
Does my further reply helps a little? If there're still anything else we
can help, please feel free to post here.
Thanks,
Steven Cheng
Microsoft Online Support

Signature
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| X-Tomcat-ID: 130864800
| References: <umrT5mH5FHA.3980@TK2MSFTNGP10.phx.gbl>
<aLYkSZP5FHA.832@TK2MSFTNGXA02.phx.gbl>
<#nDaf0T5FHA.2040@TK2MSFTNGP14.phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain
[quoted text clipped - 9 lines]
| Path: TK2MSFTNGXA02.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet.webservices:30835
| NNTP-Posting-Host: tomcatimport2.phx.gbl 10.201.218.182
|
[quoted text clipped - 80 lines]
| | >
| | > #Standard DateTime Format Strings Output Examples
http://msdn.microsoft.com/library/en-us/cpguide/html/cpconstandarddatetimefo
| | > rmatstringsoutputexample.asp?frame=true
| | >
[quoted text clipped - 3 lines]
| | >
| | > #Coding Best Practices Using DateTime in the .NET Framework
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/ht
| | > ml/datetimecode.asp
| | >
[quoted text clipped - 42 lines]
| | > |
| | > | TIA!
param@community.nospam - 15 Nov 2005 04:20 GMT
It worked. Thanks!
> Hi Param,
>
[quoted text clipped - 186 lines]
> | | > |
> | | > | TIA!
Steven Cheng[MSFT] - 15 Nov 2005 06:30 GMT
You're welcome Param,
Regards,
Steven Cheng
Microsoft Online Support

Signature
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| From: <param@community.nospam>
| References: <umrT5mH5FHA.3980@TK2MSFTNGP10.phx.gbl>
<aLYkSZP5FHA.832@TK2MSFTNGXA02.phx.gbl>
<#nDaf0T5FHA.2040@TK2MSFTNGP14.phx.gbl>
<OljTHub5FHA.1236@TK2MSFTNGXA02.phx.gbl>
<jiPrSeS6FHA.832@TK2MSFTNGXA02.phx.gbl>
| Subject: Re: datetime format in xml
| Date: Mon, 14 Nov 2005 22:20:35 -0600
[quoted text clipped - 9 lines]
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet.webservices:30884
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
|
[quoted text clipped - 128 lines]
| > | | >
| > | | > #Standard DateTime Format Strings Output Examples
http://msdn.microsoft.com/library/en-us/cpguide/html/cpconstandarddatetimefo
| > | | > rmatstringsoutputexample.asp?frame=true
| > | | >
[quoted text clipped - 3 lines]
| > | | >
| > | | > #Coding Best Practices Using DateTime in the .NET Framework
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/ht
| > | | > ml/datetimecode.asp
| > | | >
[quoted text clipped - 47 lines]
| > | | > |
| > | | > | TIA!