- π©πͺGermany jurgenhaas Gottmadingen
It's interesting as we just had a related discussion in the ECA issue queue about a time zone topic here: π± Example model for working with Dates, Timezones and Daylight Savings Time Fixed
Looking into the patch and reading the comment from @mmaranao I wonder if this could be done as a tamper plugin that extends the existing timestamp-to-date plugin with the enhancements, that a time zone can be selected, and the tamper plugin would then do all the necessary math to format the given timestamp for the selected time zone. That could be done by using the DateTime class from PHP and would then also allow all the "strange" timezones like "+4:30" and others too.
- πΊπΈUnited States sgroundwater
I worked out an updated patch that may allow for better functionality, This patch adds a Timezone select list.
The last submitted patch, 6: 0001-Issue-3268276-Reworking-timezones.patch, failed testing. View results β
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.- Status changed to Needs work
over 1 year ago 12:45pm 7 April 2023 - π©πͺGermany jurgenhaas Gottmadingen
This looks great to me, I guess you only need to add this new plugin to the schema file to fix the tests. And maybe the timezone field should be declared required in the config form. Other than that, it is really helpful and much appreciated.
- π³π±Netherlands megachriz
Thanks for the patch! In order for this to be merged, automated tests are needed as well. And I see some coding standard violations.
- πΊπΈUnited States sgroundwater
Thanks for the feedback! I'll work on these items to move things forward.
- clean up for coding standards
- declared timezone field as required in the config form
- add tests - π«π·France PhilY πͺπΊπ«π· Paris, France
Patch works for offsetting time only, could it be extended to handle date offset so one can get a date with a '-3 months' offset?