From e88185707a8cb83d5639c132d88acd516032b5a1 Mon Sep 17 00:00:00 2001 From: Eric Davies Date: Wed, 10 Nov 2021 14:24:57 -0600 Subject: [PATCH] Update ZonedDateTime constructor to clarify behaviour when from_utc=false --- src/types/zoneddatetime.jl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/types/zoneddatetime.jl b/src/types/zoneddatetime.jl index 2c832e8d9..337edf424 100644 --- a/src/types/zoneddatetime.jl +++ b/src/types/zoneddatetime.jl @@ -28,9 +28,10 @@ end ZonedDateTime(dt::DateTime, tz::TimeZone; from_utc=false) -> ZonedDateTime Construct a `ZonedDateTime` by applying a `TimeZone` to a `DateTime`. When the `from_utc` -keyword is true the given `DateTime` is assumed to be in UTC instead of in local time and is -converted to the specified `TimeZone`. Note that when `from_utc` is true the given -`DateTime` will always exists and is never ambiguous. +keyword is true the given `DateTime` is assumed to be in UTC and is converted to the specified +`TimeZone`. When `from_utc` is false the given `DateTime` is assumed to already be in the +specified `TimeZone`. Note that when `from_utc` is true the given `DateTime` will always exist +and is never ambiguous. """ function ZonedDateTime(dt::DateTime, tz::VariableTimeZone; from_utc::Bool=false) # Note: Using a function barrier which reduces allocations