angularjs - Angular Js: date field from database showing one day less -




what have in @entity person class -

@jsonformat(pattern="yyyy-mm-dd") private date dob; 

what printing on screen-

 <tr ng-repeat="person in vm.persons">        <td>{{person.id}}</td>        <td>{{person.name}}</td>        <td>{{person.location}}</td>        <td>{{person.dob}}</td>   </tr> 

the person.dob showing date 1 day lesser exist in database. possible reason ? note:

i have dob date type in database microsoft sql server. json response rest call returns timestamp being converted yyyy-mm-dd format shown above.

example of issue:- in database dob(s) are:-

dob 1989-05-18 1989-05-18 1970-01-01 

on screen showing below-

person dob 1989-05-17 1989-05-17 1969-12-31 

let me know if need more info on issue.

i recommend using moment js or utc date. common problem between server , ui





wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -

python - Read npy file directly from S3 StreamingBody -