RE: Time Zones
From: Jeffrey Tan[MSFT] (v-jetan_at_online.microsoft.com)
Date: 03/04/05
- Next message: Mattias Sjögren: "Re: Marshal.GetLastWin32Error errors"
- Previous message: Nick Malik [Microsoft]: "Re: Common practice, allowing null values in data classes."
- In reply to: NormD: "Time Zones"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 04 Mar 2005 06:20:27 GMT
Hi Mach,
Thanks for your posting!!
First, I think there are 2 understanding of your problem:
#1, You want to display the database datetime value in certain localization
format
#2, You want the datetime in the database to be universal time, which will
not be considered as a local time.
For #1, we may control this at UI side, with certain format string
For #2, yes, if the datetime value we stored does not have any universal
time mark, ADO.net will treat it as local stored, and just use local
timezone to parse it. For this issue, when storing data into the database,
we should use DateTime.ToUniversalTime to convert the datetime to universal
time, then store it into the database, then the datetime will have
universal mark, which will make the datetime universal not local.
Hope this helps.
===================================================
Thank you for your patience and cooperation. If you have any questions or
concerns, please feel free to post it in the group. I am standing by to be
of assistance.
Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
- Next message: Mattias Sjögren: "Re: Marshal.GetLastWin32Error errors"
- Previous message: Nick Malik [Microsoft]: "Re: Common practice, allowing null values in data classes."
- In reply to: NormD: "Time Zones"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|