Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
To support timezone DateTime
Message
 
À
04/04/2009 09:30:28
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 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01393251
Message ID:
01393252
Vues:
38
>Hi,
>I am developing an application which would supports multiple country (one country per database/application). How could I manage the datetime for each country application/database which reside at the same server? For example, store datetime value and display current datetime based on specified timezone. Any other thing need to be considered?
>
>Thank you

Instead of using GETDATE() function use GETUTCDATE() function. That will return UTC date time. Then when user wants date back you should convert it to Local time:
http://www.codeproject.com/KB/database/ConvertUTCToLocal.aspx

http://www.windows-tech.info/15/9115c76955a6a6e1.php
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform