Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DateTime saved in ? timezone
Message
 
 
À
05/11/2008 17:13:04
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01359985
Message ID:
01360000
Vues:
18
Hi Tim,

Your assumption is incorrect. SQL Server 2005 doesn't have timezone aware datetime data types. It saves whatever datetime value it gets. IOW, if conversion occurs, it occurs in your application.

>
>I have a web application that is connected to a SQL Server database. This SQL Sever is located in Texas and thus is Central Time. I have a C# application that is saving data to the SQL Server via a WCF application. This application saves a row with a DateTime field that indicates the time the record was created on the application. It is created with a DateTime.Now in C# at the application level. This application is running on a computer in Pacific time and the computer time is set to pacific time. The time in the SQL server is being saved in central time.
>
>I am assuming there is something in the SQL Server that is changing this time when saved. How do I override this behavior when I save the record? I want the times to be saved the way I created them.
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform