DateTime changes by Breeze before save changes -


i creating new entity , inside constructor set datetime like

function project() {     this.created = moment().format(); } 

which produce result in console current date , time

sat jun 07 2014 18:48:41 gmt+0500 (pakistan standard time) 

as call save changes , see posted date in network tabe changes hour part of datetime 2014-06-07t13:48:41.000z

it looks breeze this, may wrong, suggestion how can prevent happen?

breeze serializing date transport not transformed @ all. if 5 hours different in utc meaning localize out same when moment.format again.

if want re-localize use moment(yourdate).format(ll) or similar.

http://momentjs.com/ , go internationalization section


Comments

Popular posts from this blog

C# random value from dictionary and tuple -

cgi - How do I interpret URLs without extension as files rather than missing directories in nginx? -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -