DateTime timezone

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
7 years ago
hi,

i am having a very weird issue with a datetime object timezone.

i am using 3.80, and i am sending orders to our inner application, and for some reason the CreatedOnUtc property from order is in a very strange format.

so here is my setup.

my server is set in EST.
in my db, the value for CreatedOnUtc is 2017-01-06 14:18:01.043.
in my admin panel under the order details, it says order created on 1/6/2017 9:18:01 AM which is ok since nop prints out the current users timezone.
but when i send the data, the CreatedOnUtc = "/Date(1483730281043)/" which is the equivalent of 1/6/2017, 2:18:01 PM as u can see here http://www.freeformatter.com/epoch-timestamp-to-date-converter.html. i have no idea why it generates this value.

here is my line of code for it.

OrderCreated = order.CreatedOnUtc


and its being serialize in json format.


i tried to redo it in my local machine, and everything works just fine, but in my live server its like that, i cannot understand how this happens, can anyone guide me how i can debug this?
7 years ago
i added another property to the call
OrderCreatedKind = order.CreatedOnUtc.Kind

and i got back DateTimeKind.Unspecified

so it seems smelling here, any thoughts why this is happening, seems maybe related with Entity framework.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.