@Teodor can you clarify the new timezone options for me?
Using your example:
Example 1
Display the stored date & time to the user in the user’s time zone.
In order to display the date & time to the users in their time zone, then you need to set the:
Server Time Zone to UTC
Database Time Zone Handling to UTC
With setting as UTC as you describe, should I expect that time will be displayed in the timezone of the browser, without adding any offset manually?
I have a new project, and have confirmed it has Etc/UTC for db connection and docker settings (and the server settings as well) and time is currently shown exactly as it is in the database (UTC).
The datetime strings use the ISO 8601 notation. An UTC datetime string looks like 2023-01-11T12:00:00.000Z, Z is the zone designator for the zero UTC offset. Without the Z it would be seen as a local time, with local times the T is often replaced with a space like 2023-01-11 12:00:00.000.
When you use one of the date formatters on the client it will use the local timezone, when the datetime string didn’t contain timezone information it will be handled as if it were the local timezone. With UTC datetime strings (or any other timezone offset) it will convert it to the timezone of the client.
Hi there,
I’m trying to set my localhost (Mac M1) docker project (Node+BS5+Postgresql) and my production docker project (linode DE/Frankfurt) with Europe/Paris + Local referring to your How To post but it doesn’t work.
Any idea?
Thanks