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
Post a Comment