ngx-bootstrap icon indicating copy to clipboard operation
ngx-bootstrap copied to clipboard

Timepicker: wrong time in reactive form variable from that being shown in the html inputs

Open joelmuskwe opened this issue 8 years ago • 2 comments

When i use the timepicker the time being captured when i use reactive forms is 2hrs ahead of that being caputured in the reactive form. ngx

Example on plunker

Plunkr: https://plnkr.co/edit/qd4GxM7GJuVNryNmkeSR?p=preview

Versions of ngx-bootstrap, Angular, and Bootstrap:

ngx-bootstrap: 2.0.3

Angular: 5

Bootstrap: 4

Angular CLI: 1.7.2

joelmuskwe avatar Mar 15 '18 13:03 joelmuskwe

I have the same problem, in the model I have 2018-04-17T12:28:55.130Z but in time picker shows 13:28

Angular 5 Bootstrap 4 ngx-bootstrap: 2.0.4

MarcoBatista avatar Apr 26 '18 21:04 MarcoBatista

I don't think this is a bug. The plunker is using the 'json' pipe on the output, instead one should use the 'date' pipe with a format:

Stackblitz: https://stackblitz.com/edit/angular-btg2mu

Screenshot 2019-10-13 at 22 34 07

Edit: The json pipe shows the date time in the UTC format according to ISO_8601. While the date pipe will show the time in the browser's time zone.

danielfoord avatar Oct 13 '19 20:10 danielfoord