I want to send notifications to users in different timezones on a date and time they provide.
I haven’t implemented anything yet, but I plan to create a timestamp column and store everything in UTC. At the time of submission, the user will select a timezone and I will calculate the offset, add it to the timestamp column, and voila.
I wish it were that simple, but my plan lacks DST. I have no way of finding out if the user is in DST or not.
How do I get around this? Do I need extra columns? Is there a better approach than what I’m planning?
You can use the java TimeZone object.
You can get a list of available IDs e.g. “US/Pacific” by doing this
If you can match the ID to your users region/time zone you can do the following: