For a scheduling system, what's the best way to save the timezone of client/event in a central server database coming from multiple sources mobile,web,client app.
I need the solution to work with all databases in tags.
The Right Way: TZDB Timezone ID The right way to handle DST in Java is to instantiate a Timezone with a specific TZDB Timezone ID, eg. “Europe/Rome”. Then, we'll use this in conjunction with time-specific classes like java.
Convert to new timezone using . astimezone() on the newly localized datetime/timestamp from step 2 with the desired timezone's pytz object as input e.g. localized_timestamp. astimezone(new_timezone) .
Everything in UTC, and another column for the offset.
These are the key points to the strategy I tend to use.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With