locked
incorrect datetime returned RRS feed

  • Question

  • i used latest version Microsoft.CrmSdk.XrmTooling.CoreAssembly 9.0.0.7 to save datetime to CRM database.

    if i used CrmServiceClient.Update() and GetEntityDataById() to update then retrieve the datatime, the returned is just what i saved. but, incorrect datetime returned when i used LINQ and Expression. what is wrong?

    code:

    Tuesday, December 19, 2017 10:27 AM

Answers

  • You probably live in India (at least a +5.5 timezone). CRM saves DateTimes in UTC. When you retrieve the datetime you will get the UTC datetime. A CRM form will transfer it to your CRM timezone.
    • Edited by Jan AS Tuesday, December 19, 2017 3:15 PM
    • Marked as answer by steven_ Thursday, December 21, 2017 2:56 AM
    Tuesday, December 19, 2017 3:14 PM

All replies

  • You probably live in India (at least a +5.5 timezone). CRM saves DateTimes in UTC. When you retrieve the datetime you will get the UTC datetime. A CRM form will transfer it to your CRM timezone.
    • Edited by Jan AS Tuesday, December 19, 2017 3:15 PM
    • Marked as answer by steven_ Thursday, December 21, 2017 2:56 AM
    Tuesday, December 19, 2017 3:14 PM
  • Is it mean i need to transfer it myself if integrated development with CRM?

    • Edited by steven_ Thursday, December 21, 2017 2:51 AM
    Thursday, December 21, 2017 2:01 AM