You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
time_bucket_gapfill() function provides 3rd argument, the timezone.
Granted, in documentation, the timezone is explained only as a literal symbol, for example, "Europe/Prague".
Timezone can be expressed by timezone code and offset from GMT. For example "Europe/Prague" can be represented by +01:00 (or CET) or by +02:00 for summertime (CEST)
Note that + sign in the offset.
time_bucket_gapfill() accepts all three conventions (Europe/Prague, CET, +01:00). For Europe/Prague and CET returns the same values. When using the time offset it expects a negative sign (-1:00) in order to return correct values.
Here is an example. Note all dates are from winter time, matching CET or +1h offset to GMT.
What type of bug is this?
Incorrect result
What subsystems and features are affected?
Gapfill
What happened?
time_bucket_gapfill()
function provides 3rd argument, the timezone.Granted, in documentation, the timezone is explained only as a literal symbol, for example, "Europe/Prague".
Timezone can be expressed by timezone code and offset from GMT. For example "Europe/Prague" can be represented by
+01:00
(or CET) or by+02:00
for summertime (CEST)Note that
+
sign in the offset.time_bucket_gapfill()
accepts all three conventions (Europe/Prague, CET, +01:00). For Europe/Prague and CET returns the same values. When using the time offset it expects a negative sign (-1:00) in order to return correct values.Here is an example. Note all dates are from winter time, matching CET or +1h offset to GMT.
The result is:
The same result can be achieved replacing
Europe/Prague
withCET
.But with
+01:01
the result is:The same result as Europe/Prague can be achieved with offset
-01:01
which is an incorrect representation of the CET timezone.TimescaleDB version affected
2.18.2
PostgreSQL version used
17.3
What operating system did you use?
Fedora 41
What installation method did you use?
Docker
What platform did you run on?
On prem/Self-hosted
Relevant log output and stack trace
How can we reproduce the bug?
The text was updated successfully, but these errors were encountered: