AI & Agent Dev Bug Sandbox logo
AI & Agent Dev Bug Sandbox
Back to Radar

Outdated Tzdata Causing Incorrect UTC+1 Offset For Africa/Casablanca

Supabase infrastructure uses an obsolete tzdata package that defines Africa/Casablanca as UTC+1 instead of the correct UTC+0, causing all timestamps for this timezone to be shifted by one hour, disrupting queries, jobs, and client syncs.

highConfidence 92%InfrastructureAffected V< 2018bFixed V>= 2018b

Origin Analysis

The system timezone database (tzdata) is outdated and retains the pre-2018 DST rule for Africa/Casablanca. Since Morocco adopted permanent UTC+0 in 2018, any tzdata release before 2018b incorrectly applies a +1 hour offset. This obsolete definition is used by the operating system and propagated to database and application layers.
1. In the affected environment, run the following command to check the offset:\n TZ=Africa/Casablanca date +%z\n2. Observe that the output is +0100 instead of the expected +0000.\n3. To verify the correct behavior, compare with a system running tzdata 2018b or later, where `zdump -v Africa/Casablanca` shows no DST transitions and the offset is +00.

Fixing Code Block

Edge Case Audit

Upgrading tzdata affects all timezone calculations system-wide. If any application logic currently compensates for the incorrect +01 offset, it may break after the fix. Rolling back requires reinstalling the previous tzdata version or restoring from a snapshot. During the upgrade, there may be a brief window where some processes still use the old data and others use the new data, leading to mixed offsets for concurrent transactions; schedule a maintenance window. In containerized environments, changes made to a running container are ephemeral; update the base image and redeploy to persist. Verify all critical jobs and audit logs before applying in production.

Ecosystem Topology