-
Notifications
You must be signed in to change notification settings - Fork 849
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix debug information for Timestamp with Timezone #3072
Conversation
cc @tustvold |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
#[test] | ||
#[cfg(feature = "chrono-tz")] | ||
fn test_timestamp_with_tz_with_daylight_saving_fmt_debug() { | ||
let arr: PrimitiveArray<TimestampMillisecondType> = | ||
TimestampMillisecondArray::from(vec![ | ||
1647161999000, | ||
1647162000000, | ||
1667717999000, | ||
1667718000000, | ||
]) | ||
.with_timezone("America/Denver".to_string()); | ||
assert_eq!( | ||
"PrimitiveArray<Timestamp(Millisecond, Some(\"America/Denver\"))>\n[\n 2022-03-13T01:59:59-07:00,\n 2022-03-13T03:00:00-06:00,\n 2022-11-06T00:59:59-06:00,\n 2022-11-06T01:00:00-06:00,\n]", | ||
format!("{:?}", arr) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add these test cases to timezone with daylight saving
Ok(tz) => match as_datetime_with_timezone::<T>(v, tz) { | ||
Some(datetime) => write!(f, "{}", datetime.to_rfc3339()), | ||
None => write!(f, "null"), | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
outputs to rfc3339 format if tz parsed successfully
Benchmark runs are scheduled for baseline = d76a0d6 and contender = a0fb44a. a0fb44a is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
Which issue does this PR close?
Closes #2917
Rationale for this change
outputs
What changes are included in this PR?
Are there any user-facing changes?
yes, debug information for timestamp changed