Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DateTime timezone behavior
Message
De
11/11/2008 16:18:09
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
 
 
À
11/11/2008 09:25:32
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
C# 3.0
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01360004
Message ID:
01361175
Vues:
19
>>Hey Tim,
>>
>>We've run into this issue too when the server is in a different time zone than the client workstation ... so far, this isn't likely to happen for our customers and so we haven't addressed the issue yet, but we certainly need to. I haven't had the time to sit down and brainstorm as to what our solution will be yet though, so I'll be interested in what you come up with.
>>
>>~~Bonnie
>>
>
>Hi Bonnie, At this point I have no resolution only because I can't get the time to display in my web grid view. We upload the records from a moving vehicle that could be from a number of different organizations around the US. The organization then views the data on the website and only needs to see this in the timezone it was created in. This is why I didn't initially care about saving it in UTC. Unfortunately the time is being saved in Central time the same as the hosting server. I fail to understand why or how to change that. I decided to save in UTC which is really easy; and to have a setting for the organization that indicated which timezone preference. so far I am unable to get the web GridView to display this back as a corrected time.
>Tim

I found the problem with trying to display the corrected time in my GridView. I was using an EditItemTemplate per the example I had and when I changed it to an ItemTemplate it worked. I just didn't notice that mistake.

Now I am trying to localize the data. It looks like TimeZone is no longer recommended and we should use TimeZoneInfo class instead. This has a method of getting the timezone from a serialized file. Does anyone have a timezone.xml file that contains all the US timezones in it? I am almost there.
Tim
Timothy Bryan
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform