Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1390
Handling of UTC Dates
posted

Hi, I'm recieving UTC dates from the server formatted as JSON, what I want to find out is how the grid handles UTC date. displaying the dates as local time received from the server and to the server when filering on date columns?

Please can u advice on how to resolve this issue.

Thanks in advanced.

Regards Christoff

  • 24671
    Suggested Answer
    posted

    Hi Christoff,

    i am not sure i understand correctly - are you using the MVC wrapper? In that case the Microsoft JSON serializer sends dates in the format \/Date(1294268400000)\/. Then this is handled by the client-side code, i.e. this special format is recognized and parsed.

    if you have some custom backend, which sends dates as strings, or as ticks, specifying the column "dateType" to be equal to "date" will automatically convert those to Date objects. This is done without adding any local offset, i.e. everything is assumed to be UTC and is not converted to local dates and times. 

    Let me know if this helps. Thanks,

    Angel