ZhongxuanWang opened a new issue, #12343:
URL: https://github.com/apache/arrow-rs/issues/12343

   ### Is your feature request related to a problem or challenge?
   
   `parquet` declares `chrono` as a required dependency (`chrono = { workspace 
= true }` in `parquet/Cargo.toml` on `main`, and the same in 60.0.0 and 
60.1.0), with no feature that turns it off. A build with `default-features = 
false` and without the `arrow` feature therefore still links `chrono`, and with 
it [RUSTSEC-2026-0543](https://rustsec.org/advisories/RUSTSEC-2026-0543.html) 
("chrono is unmaintained", all versions affected), which `cargo audit` and 
`cargo deny` then report for every crate that depends on `parquet`.
   
   As far as I can see, `parquet`'s own use of `chrono` is limited to three 
display helpers in `parquet/src/record/api.rs` (plus their tests):
   
   - `convert_date_to_string`: `%Y-%m-%d`
   - `convert_timestamp_millis_to_string`: `%Y-%m-%d %H:%M:%S%.3f %:z`
   - `convert_timestamp_micros_to_string`: `%Y-%m-%d %H:%M:%S%.6f %:z`
   
   All three format a UTC instant as a fixed string, so the offset is always 
`+00:00`.
   
   ### Describe the solution you'd like
   
   Replace `chrono` in those three helpers with plain integer arithmetic (days 
since the epoch to a civil year, month and day, for example Howard Hinnant's 
`civil_from_days`, then fixed-width formatting), and move `chrono` from 
`parquet`'s `[dependencies]` to `[dev-dependencies]` if the existing tests 
should keep using it. The output stays byte-for-byte the same, and the existing 
`test_convert_date_to_string`, `test_convert_timestamp_millis_to_string` and 
`test_convert_timestamp_micros_to_string` tests already pin it.
   
   ### Describe alternatives you've considered
   
   - Make `chrono` optional behind a feature. That removes it only for users 
who turn the feature off.
   - Wait for #9183 (replace `chrono` with `jiff` across arrow-rs). That is a 
much larger change; this use in `parquet` could drop the dependency on its own 
first.
   
   ### Additional context
   
   Related: #9183. The doc comment on `convert_date_to_string` says the date 
"is displayed in local timezone", while the code formats it in UTC.
   


-- 
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