asp.net - Why WCF service change date value in case different TimeZone on client and server side -


i have wcf service, 1 service method return array of objects, single object contain date values, example {14-05-2013 08:00:00} kind: unspecified. can see in debug mode value before return point in method.

on cleint side getting json object contain wrong date value property: date(1368511200000+0200) equal tue may 14 2013 09:00:00 gmt+0300 (fle daylight time)

it happens in case when client (browser) , iis server in different time zones.

why see shifted date values , how fix ?

thanks.

the date values stay same, presentation shifts because timezone changes.

08:00 in berlin is 07:00 in london.

if want transfer same presentation regardless of fact it's no longer same instant in time once presentation crosses time zones, send string instead of date.

you change kind of datetime utc, have implications on server side well.

more information time zone conversion available here.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -