Skip to content

Commit

Permalink
chore: mention that the offset varies based on daylight savings time
Browse files Browse the repository at this point in the history
  • Loading branch information
appletreeisyellow committed Jul 9, 2024
1 parent f8ef51b commit ae9f1ad
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions datafusion/functions/src/datetime/to_local_time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,14 @@ impl ToLocalTimeFunc {
///
/// The difference between `1_553_990_400_000_000_000` and `1_553_994_000_000_000_000` is
/// `3600_000_000_000` ns, which corresponds to 1 hour. This matches with the timezone
/// offset for "Europe/Brussels". Consequently, DataFusion can represent the timestamp in
/// local time (with no offset or timezone information) as
/// offset for "Europe/Brussels" for this date.
///
/// Note that the offset varies with daylight savings time (DST), which makes this tricky! For
/// example, timezone "Europe/Brussels" has a 2-hour offset during DST and a 1-hour offset
/// when DST ends.
///
/// Consequently, DataFusion can represent the timestamp in local time (with no offset or
/// timezone information) as
///
/// ```text
/// TimestampNanosecond(Some(1_553_994_000_000_000_000), None)
Expand Down

0 comments on commit ae9f1ad

Please sign in to comment.