waitingkuo commented on code in PR #2939:
URL: https://github.com/apache/arrow-rs/pull/2939#discussion_r1007772303
##########
arrow-array/src/array/primitive_array.rs:
##########
@@ -116,40 +119,40 @@ pub type Float64Array = PrimitiveArray<Float64Type>;
/// # Example: UTC timestamps post epoch
/// ```
/// # use arrow_array::TimestampSecondArray;
-/// use chrono::FixedOffset;
+/// use arrow_array::timezone::Tz;
/// // Corresponds to single element array with entry 1970-05-09T14:25:11+0:00
/// let arr = TimestampSecondArray::from(vec![11111111]);
/// // OR
/// let arr = TimestampSecondArray::from(vec![Some(11111111)]);
-/// let utc_offset = FixedOffset::east(0);
+/// let utc_tz: Tz = "+00:00".parse().unwrap();
Review Comment:
@alamb
I can't add it here as inner data is private now
```bash
error[E0423]: cannot initialize a tuple struct which contains private fields
--> src/array/primitive_array.rs:143:14
|
12 | let utc_tz = Tz(FixedOffset::east(0));
| ^^
|
note: constructor is not visible here due to private fields
-->
/Users/willy/willy/waitingkuo/arrow-rs/arrow-array/src/timezone.rs:246:19
|
246 | pub struct Tz(FixedOffset);
| ^^^^^^^^^^^ private field
```
https://github.com/apache/arrow-rs/blob/87ac05bcafd343d3d8ad3b519631d83090afeb1c/arrow-array/src/timezone.rs#L249-L251
as #2909 is to add a timezone abstraction, do we still encourage user to use
chrono api directly?
@tustvold do you have any comments?
--
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]