diff --git a/datafusion/functions/src/datetime/to_local_time.rs b/datafusion/functions/src/datetime/to_local_time.rs index b286c0217baab..1febc8811140e 100644 --- a/datafusion/functions/src/datetime/to_local_time.rs +++ b/datafusion/functions/src/datetime/to_local_time.rs @@ -248,35 +248,7 @@ impl ToLocalTimeFunc { /// 2019-03-31T01:00:00 /// ``` /// -/// # Example -/// -/// ``` -/// # use chrono::NaiveDateTime; -/// # use arrow::array::types::TimestampNanosecondType; -/// # use datafusion_functions::datetime::to_local_time::adjust_to_local_time; -/// -/// let timestamp_str = "2020-03-31T13:40:00"; -/// let tz: arrow::array::timezone::Tz = -/// "America/New_York".parse().expect("Invalid timezone"); -/// -/// let timestamp = timestamp_str -/// .parse::() -/// .unwrap() -/// .and_local_timezone(tz) // this is in a local timezone -/// .unwrap() -/// .timestamp_nanos_opt() -/// .unwrap(); -/// -/// let expected_timestamp = timestamp_str -/// .parse::() -/// .unwrap() -/// .and_utc() // this is in UTC -/// .timestamp_nanos_opt() -/// .unwrap(); -/// -/// let res = adjust_to_local_time::(timestamp, tz); -/// assert_eq!(res, expected_timestamp); -/// ``` +/// See `test_adjust_to_local_time()` for example fn adjust_to_local_time(ts: i64, tz: Tz) -> i64 { let date_time = match T::UNIT { Nanosecond => Utc.timestamp_nanos(ts),