Hi Everyone, I've been reading about timezones and still sufficiently confused that I can't solve this problem. Here's where I am...
I have a gym booking app based in the UK that uses the Syncfusion calendar (with assistance from the great guys at Blupry - thank you). The app business owner wanted all times to be shown in the calendar in UK time, even when the user may be in another time zone - so for example, a personal trainer books sessions in UK time, then maybe they travel to Italy (GMT+1). The calendar will still show as UK time when in Italy - and this makes sense, you'll want to see the bookings for the gym in UK time.
The problem I have then is that if the trainer books a new appointment, the appointment is saved in Firebase but is earlier by one hour - so a 06:30 appointment booked in Italy becomes a 05:30 appointment in the UK. To get the appointment time from the user I either read the time into a variable (datee) from the tap on the calendar or use bottom picker (https://pub.dev/packages/bottom_picker)
Then I create an appointment record in Firebase appointments collection - and that's where it goes wrong and writes one hour earlier.
So... do I need to do something like:
What timezone is the device in?
Is the timezone in the UK? If so, proceed as normal.
If not, save the time by adding the time difference to the selected time
Any thoughts / help would be appreciated.
Thanks!
John