Good morning Christian,
Thank you for your detailed answer.
I have worked in the core business of an ERP software vendor for 10 years and know how to deal with time zones and their pitfalls. Currently, as a software developer, I am converting an outdated software to a new platform. Based on my experience, the conversion process would be a bit different:
1. first, I would provide a class/library/API, which neatly provides the most basic functionality. This API will later be the central point for all time zone time operations. This API needs to be designed as with a lot of care and foresight. At a minimum, it must include:
- Convert time from one time zone to another
- calculate time differences (taking into account time zones)
- uniform formatting and parsing of times
Even if the API only consists of many convenience functions, a unified API or a clear statement represents how you want it to be later.
This API can, then already extension developers use and one would have feedback.
2. Second step extend the persistence layer based on our API (without changing anything!!). These new fields always consist of two fields time zone and time information. This must be clearly mappable in the TCA data model descriptions.
Addition: Cool, it would be also if by injection beside the raw data also equal the formatted time into the model class could be brought. That would be easier for many and the proliferation of how something is formatted would be reduced.
3. Step three: Then I would build BE fields that have timezone+time.
4. Step four is then simple: The BE fields get the possibility to use the timezone of another field. So you can create multiple timezone-dependent BE fields that all refer to one timezone. (first the time zone must be stored in the own table, later other sources are added: e.g. the settings of the FE user or BE user).
All these steps drag on over several release changes. The old time specifications are several releases already marked as deprecated.
5. So in the fifth and final step you can change everything over to the new infrastructure piece by piece.
Best regards
Note on some issues:
More complex are the formattings: but these can be easily obtained via a free OS (linux) and provided via translation tables.