This is an automated email from the ASF dual-hosted git repository.
alamb pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-rs.git
The following commit(s) were added to refs/heads/main by this push:
new 595a83561e Add additional documentation for UTC representation of
timestamps (#6994)
595a83561e is described below
commit 595a83561e6512c757bca2786f974abb3b711f1d
Author: Abdullah Sabaa Allil <[email protected]>
AuthorDate: Tue Jan 21 13:19:48 2025 +0100
Add additional documentation for UTC representation of timestamps (#6994)
* docs(arrow-schema): add additional documentation regarding UTC
representation
* docs(arrow-schema): clearer docs
* fix: whitespaces
---
arrow-schema/src/datatype.rs | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arrow-schema/src/datatype.rs b/arrow-schema/src/datatype.rs
index 23bd2e2cfa..705b619067 100644
--- a/arrow-schema/src/datatype.rs
+++ b/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.
+ ///
///
/// Timezone string parsing
/// -----------------------