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

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

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