Reputation: 244
Is There some way to configure sql server to store UTC time in the database if passed local date time values??
Upvotes: 2
Views: 1617
Reputation: 499132
No, there isn't.
You need to either convert to UTC before passing to SQL Server or after.
A DateTime
instance that is passed in to SQL Server looses the associated DateTimeKind
during the transfer, as the SQL type doesn't have anything corresponding to it.
Upvotes: 3