DateTime is not giving accurate day time

Hi there,

I have a DateTime in the current format:

<ion-datetime displayFormat="h:mm A" pickerFormat="h mm A" [(ngModel)]="date1" (ionChange)="saveDate(1)"> </ion-datetime>

and

date1: String = new Date().toISOString();

Now I want the user to only be able to pick hour and minute, but for date1 to still capture the full ISO 8601 string (year, month, day, etc etc).

Whenever I print out date1, it gives me an accurate year and month (2016-09), but the day is not correct (gives me 20, rather than 23 which is today’s day).

Is there something I’m overlooking, or is this a bug of some sort? I’d appreciate any help. Thanks

ISOString returns GMT time and, in most cases, it’s different from local time. I’m not sure why you’re getting 3 days difference though.

I didn’t find a solution yet how to display local device time using ion-datetime without calculating it pro grammatically. Does anybody else have a solution?