I’m building a web app and currently trying to get to grips with timezones. I’m using Nextjs for my front end. My rough plan is as follows:
- Detect and save (in Strapi) the user’s device timezone when they register
- Use that timezone as the default timezone on the frontend
- Provide an option for the user to update their timezone in a settings page on the frontend
- Store all times as UTC in Strapi (the default I believe)
So my question is really, does this sound like a valid approach? And is there any support for this baked into Strapi or will I have to develop it mostly myself? I’ve had a bit of a search but not come up with much so far.
I’ve found a few solutions on the frontend, packages which provide dropdown lists of timezones for Nextjs etc.
Any pointers, tips or advice much appreciated.