Timezone: Handle timezones

Created on 23 February 2013, over 11 years ago
Updated 23 October 2023, 8 months ago

There was some effort here to store the timezone #1595158: Refactored display formatter β†’ , but I think it got lost. With timezone some calculations would need to be added for use cases like:
The user viewing the content with office hours is in a different timezone.
The main use cases would be: OH on users around the globe; OH on entities (restaurants, stores) around the globe.

(Note: see also 🌱 [META] Add timezone support to core date fields Active )

Here's a breakdown:
Task 1: Where to store the timezone:
Preferably the timezone is prefilled, depending on an Address in the entity's fields.
[EDIT after reading #10: ]
-- use Time zone field on the same Entity (wich can also be a user)
-- in case of an OH-field on user, use the built-in 'user time zone'
-- Clock module can be used to copy its code to do: "Time zone can be configured as: Site time zone, user time zone, local time zone and custom time zone."

Task 2: How to show the timezone: This should be configurable per use case
-- do not show/do not use (current situation)
-- show ccs-able subfield with entity's timezone (like 'GMT')
-- show css-able difference (like 'these times are 2 hours earlier then yours')
-- change the times to the correct timezone. (which one? see task 3)

Task 3: which time zone to use in the formatter? We have 3 timezones:
-- system timezone
-- user/viewer timezone
-- entity timezone.
You might need to show the user's timezone in the OH formatter, since most users will not have edited this. Anonymous users can be around the globe, and don't even have the possibility.
Overkill: We can provide some buttons 'set my timezone' ; 'show times in my timezone'; 'show times in local timezone'

✨ Feature request
Status

Active

Version

1.0

Component

Code - formatter

Created by

πŸ‡­πŸ‡ΊHungary giorgio79

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

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.69.0 2024