3 ms·
I never realised this problem despite having to work with some datetime problems before. But as you said the solution is not full proof. The biggest problem wit
by tmd83 12y ago
I never realised this problem despite having to work with some datetime problems before. But as you said the solution is not full proof. The biggest problem with your (what I believe is theoretically foolproof solution) is that it will for practical consideration. Most users will be unable to understand the complexity of the issue to properly choose whether to set the absolute/localized time or even which offset to apply in a lot cases. In case of some events one might not even know or find it hard to decide which timezone should be the primary timezone for the event or it might even change.
I think in terms of user understanding is to use one timezone (also shown to the user) to generate the UTC time and later if any changes happen to the timezone of the event or the corresponding user's timezone warn the user and ask for each event (maybe even in bulk) whether to
1. Keep the original walltime in the timezone (in case this is the deciding timezone) this will imply changes for users in other timezone.
And at this point some calculation figures out how to adjust the UTC.
2. Ignore the timezone change and keep the original offset.
3. Manually update.