Abdullahsab3 commented on code in PR #6994:
URL: https://github.com/apache/arrow-rs/pull/6994#discussion_r1922232920


##########
arrow-schema/src/datatype.rs:
##########
@@ -196,6 +196,13 @@ pub enum DataType {
     /// DataType::Timestamp(TimeUnit::Second, Some("literal".into()));
     /// DataType::Timestamp(TimeUnit::Second, 
Some("string".to_string().into()));
     /// ```
+    /// For UTC time
+    /// ----------------------------
+    /// For UTC time, it is possible to use either the timezone 
representation, such as "UTC", or the absolute time zone offset "+00:00".
+    /// However, it is better to use the offset representation, as it is more 
explicit and less ambiguous.
+    /// This also ensures that other arrow-rs functionalities can interpret 
the UTC timestamps correctly
+    /// For example, the `with_timezone_utc` method that is applied on 
timestamp arrays to add the UTC timezone.

Review Comment:
   This part is specific to UTC, since arrow-rs functionalities regarding UTC 
time (such as `with_timezone_utc`) uses `+00:00` to indicate UTC. So if you 
create a timestamp array with the `UTC` timezone, and call `with_timezone_utc`, 
the call would fail.
   
   I don't believe it's possible to substitute named timezones with fixed 
offsets. There is daylight savings that needs to be taken into account. for 
example `Europe/Brussels` is either `+01:00` or `+02:00` depending on DST



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to