Is your feature request related to a problem? Please describe.
We are experience some difficultly when working with Date picker on DatoCMS. Basically there are some record we wanted to show the date in a different time zone.
Take for example we have a list of records about our event.
The event date will be based on the city/country timezone. Eg, event in Singapore, London and Italy. We have configured the timezone in the system is Singapore timezone.
So when I set the value for the date picker for the event in London, there are no way for me to specify London timezone. It will always take the Singapore timezone as the value so that the value that I expected was not correct.
We wanted to have a way to specify the timezone for the date picker.
Describe the solution you’d like
Could you please add a timezone selection in the date picker by default or has an option when create the date picker to has timezone selection?
Describe alternatives you’ve considered
Additional context
I sent an email to Matteo and below was his suggestions.
Meanwhile, I can offer you a couple of workarounds:
- set the date as if there weren't timezones and deal with the representation in the frontend
- use three fields, one per timezone so that you don't get confused
- add a timezone field using the number field so that you can have the time in UTC and then add the timezone accordingly
I still couldn’t wrap my head around these solutions and how they are going to work together.
For example I have an event on 13 Aug 2019, 9AM London time.
If my website was configured as Singapore timezone (+8). When I set the date as 13 Aug 2019, 9AM. It will understand in +8 Timezone and when I check the graphql, I received
2019-08-13T01:00:00.000Z
. Meaning the input was wrong, it is not what I expected to received.
I wanted to received 2019-08-13T03:00:00.000Z
or 2019-08-13T09:00:00.000+02:00
And as Matteo suggestion, when I received 2019-08-13T01:00:00.000Z
. How do I use this value combine with the another timezone to get the correct value. I don’t think there is a way because the input was basically wrong.