NOT CORRECT DATE WITH TIMEZONE

Created on 23 May 2022, over 2 years ago
Updated 16 March 2023, over 1 year ago

Problem/Motivation

When you use it to format date, the format date mysql/mariaDB function not get the timezone, so, the dates can be wrong for different timezone users.

Proposed resolution

Just change the SQL query

DATE_FORMAT(FROM_UNIXTIME( field_timestamps ), '%Y/%m')

to

DATE_FORMAT( CONVERT_TZ ( FROM_UNIXTIME( field_timestamps ), '+00:00' , '+02:00' ), '%Y/%m')

to convert the timezone. I use +00:00 and +02:00 as an example ... but you can get the configuration timezone by the views option settings "timezone". I think is not complex to do.

πŸ› Bug report
Status

Needs work

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024