Day cell's date incorrect

2 posts, 0 answers
  1. Ian
    Ian avatar
    68 posts
    Member since:
    Jul 2017

    Posted 19 Oct 2017 Link to this post

    I have a cell that's Date property is claiming that {2017-10-15 23:00:00 +0000} is the 16th of October. It's close!

    Is this something to do with time zones?

  2. Nikolay
    Admin
    Nikolay avatar
    37 posts

    Posted 24 Oct 2017 Link to this post

    Hello, Ian,

    Indeed the offset you're observing is caused by the device timezone.

    If you need the actual Date displayed in the Cell you can convert the cell date to local time. I'm providing a simple code snippet that should do the trick:

    var localDate = ((System.DateTime) cell.Date).ToLocalTime();


    I hope this information helps.

    Regards,
    Nikolay
    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top