This project has moved. For the latest updates, please go here.

Time in SLK database

Topics: Project Management Forum, User Forum
Apr 28, 2009 at 6:53 AM
Good afternoon!
I have small problem...Maybe somebody knows how to solve it!
When I create an assignment to learner , the data about this assignment send to SharePointLearningKit Database on SQL Server 2005.
Particularly, in fields StartDate and CreatedDateof AssignmentItem table time  is written 4 hours earlier than actual time of creating assignment.
For example, I creat assignment at 10 o'clock a.m., and in database 6 o'clock is assigned for this assignment.

Does anybody know why SQL save time with such difference?

Thank you very much!
Apr 30, 2009 at 3:03 PM
The dates are store in the database in the UTC timezone, also known as GMT or Zulu time. I assume that you are in somewhere like Moscow or Dubai which are 4 hours ahead of UTC.

SLK Co-ordinator
May 12, 2009 at 4:58 AM

Of course, I'm in Moscow region and have time 4 hours ahead of UTC! But when I stand time on GMT 00:00 (Grinwich), it is does not help me. The time in database is written 4 hours earlier than actual time of creating assignment anyway! Where SQL take it's time?

May 28, 2009 at 10:42 PM

When Sql Server stores dates and times it always stores then in UTC. So when it is passed a date time value it will always convert that into UTC before storing it. If the date time doesn't have an explicit time zone associated with it, then Sql Server will assume that it is in the local time zone. When the data is retrieved back out of the database it is the application's responsibility to convert it to the local time.