View Issue Details

IDProjectCategoryView StatusLast Update
5303Composrcore_fieldspublic2024-10-12 20:23
ReporterPDStig Assigned ToPDStig  
PrioritynormalSeverityminor 
Status resolvedResolutionfixed 
Product Version11.beta3 
Summary5303: 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
Attach Tags
Attached Files
Time estimation (hours)
Sponsorship open

Sponsor

Date Added Member Amount Sponsored

Relationships

related to 3802 ClosedGuest Composr alpha bug reports Recurring calendar event dates "moving" on their own 

Activities

PDStig

2023-11-02 04:35

administrator   ~8006

Check if this happens on date catalogue fields as well

admin

2024-10-12 20:18

administrator   ~9460

Last edited: 2024-10-12 20:23

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   ~9461

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   ~9462

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 PDStig New Issue
2023-02-20 21:56 PDStig Status Not Assigned => Assigned
2023-02-20 21:56 PDStig Assigned To => user4172
2023-02-20 23:14 PDStig Relationship added related to 3802
2023-02-26 18:29 Chris Graham Category General => General / Uncategorised
2023-11-02 04:35 PDStig Note Added: 0008006
2024-10-12 20:18 PDStig 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 PDStig Tag Attached: Roadmap: v11
2024-10-12 20:23 PDStig Note Edited: 0009460