Howdy folks,
According to the docs - https://ionicframework.com/docs/api/datetime - “Important: ion-datetime will always display values relative to the user’s timezone”
Just trying to see this work as expected with a mega basic example:
<ion-datetime displayFormat="DD/MM/YYYY HH:mm" value="2019-07-15T18:00:00+00:00"></ion-datetime>
This will display “15/07/2019 18:00”.
I am currently in BST, i.e. GMT / UTC +01:00, so I would be expecting the first example to show “15/07/2019 19:00”, i.e. identifying that I am in fact an hour ahead.
NB. if I add this using the angular date pipe:
<div [innerHtml]="'2019-07-15T18:00:00+00:00' | date:'medium'"></div>
Then I get “Jul 15, 2019, 7:00:00 PM”, which is what I’d expect.
In the meantime I think I will need to change the date before giving it to the input and then change it back before processing it, but I’d really rather not!
Any pointers?