View Issue Details

IDProjectCategoryView StatusLast Update
0005303Composrcore_fieldspublic2024-10-12 20:23
ReporterPatrick SchmalstigAssigned ToPatrick Schmalstig 
SeverityMinor-bug 
Status resolvedResolutionfixed 
Product Version11.beta3 
Fixed in Version 
Summary0005303: CPF and catalogue date and date_time fields do not handle time zones properly
DescriptionA CPF date field on a profile with a filled in date will keep rolling back by 1 day each time the profile is saved.

Might be a timezone issue / might be happening when the timezone is < GMT.
TagsRoadmap: v11
Time estimation (hours)
Sponsorship open

Relationships

related to 0003802 closed Composr alpha bug reports Recurring calendar event dates "moving" on their own 

Activities

Patrick Schmalstig

2023-11-02 04:35

administrator   ~0008006

Check if this happens on date catalogue fields as well

admin

2024-10-12 20:18

administrator   ~0009460

Last edited: 2024-10-12 20:23

View 2 revisions

Automated response: CPF and catalogue date and date_time fields do not handle time zones properly

The date and date_time fields used in CPFs and in catalogues did not properly handle time zones. This resulted in some weird conversions and changes to the values when going in to edit an entry (or a profile).

This hotfix applies the following changes:

* The date field no longer respects time zones (we can't because dates are always midnight which causes some weird behaviour)
* The date_time field is now the only date-based field that respects time zones; this is indicated when selecting a field type.
* The date_time field will take input in the user's time zone, save as UTC in the database, and render as whichever time zone the viewer is in.

admin

2024-10-12 20:18

administrator   ~0009461

Fixed in Git commit bf4beb7bf9 (https://gitlab.com/composr-foundation/composr/commit/bf4beb7bf9 - link will become active once code pushed to GitLab)

admin

2024-10-12 20:18

administrator  

hotfix-5303, 2024-10-12 8pm.tar (214,528 bytes)

admin

2024-10-12 20:18

administrator   ~0009462

A hotfix (a TAR of files to upload) has been uploaded to this issue. Only apply this hotfix if you absolutely need it and cannot wait until the next release of Composr (releases are more reliable and strictly tested). As of Composr version 11, the recommended way to apply a hotfix is by following the same steps as an upgrade (https://baseurl/upgrader.php, use the hotfix on the step “Transfer across new/updated files”). The upgrader will automatically skip files belonging to addons you do not have installed or that are newer on disk than in the hotfix. Otherwise, you can manually extract and replace these files (do not replace if your on-disk file is newer than the one in the hotfix). Always take backups of your site or at least files you are replacing before applying a hotfix. Not sure how to extract TAR files to your Windows computer? Try 7-zip (http://www.7-zip.org/).

Issue History

Date Modified Username Field Change
2023-02-20 21:56 Patrick Schmalstig New Issue
2023-02-20 21:56 Patrick Schmalstig Status non-assigned => assigned
2023-02-20 21:56 Patrick Schmalstig Assigned To => Patrick Schmalstig
2023-02-20 23:14 Patrick Schmalstig Relationship added related to 0003802
2023-02-26 18:29 Chris Graham Category General => General / Uncategorised
2023-11-02 04:35 Patrick Schmalstig Note Added: 0008006
2024-10-12 20:18 Patrick Schmalstig Summary CPF date field: Date rolls back by 1 day on every profile edit => CPF and catalogue date and date_time fields do not handle time zones properly
2024-10-12 20:21 Patrick Schmalstig Tag Attached: Roadmap: v11
2024-10-12 20:23 Patrick Schmalstig Note Edited: 0009460 View Revisions