Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Added support to write timestamps with timezones for CSV #623

Merged
merged 1 commit into from
Nov 22, 2021

Conversation

jorgecarleitao
Copy link
Owner

  • Fixed error in converting time64 to string
  • Made default options equal the formatting used by chrono (so, rfc3339)
  • Added support to write timestamps with timezones (both +XX:YY and IANA if chrono-tz is enabled)

backward incompatible migration

Use the options

SerializeOptions {
      date32_format: Some("%F".to_string()),
      date64_format: Some("%F".to_string()),
      time32_format: Some("%T".to_string()),
      time64_format: Some("%T".to_string()),
      timestamp_format: Some("%FT%H:%M:%S.%9f".to_string()),
}

to recover the original behavior

@codecov
Copy link

codecov bot commented Nov 22, 2021

Codecov Report

Merging #623 (e91b0af) into main (b3ed162) will increase coverage by 0.03%.
The diff coverage is 43.75%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #623      +/-   ##
==========================================
+ Coverage   69.70%   69.74%   +0.03%     
==========================================
  Files         299      299              
  Lines       16599    16749     +150     
==========================================
+ Hits        11571    11681     +110     
- Misses       5028     5068      +40     
Impacted Files Coverage Δ
src/io/csv/write/serialize.rs 49.13% <40.78%> (+15.19%) ⬆️
src/temporal_conversions.rs 74.82% <100.00%> (+0.34%) ⬆️
src/io/parquet/read/nested_utils.rs 78.43% <0.00%> (+0.98%) ⬆️
src/array/specification.rs 78.12% <0.00%> (+4.95%) ⬆️
src/types/mod.rs 31.18% <0.00%> (+7.57%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b3ed162...e91b0af. Read the comment docs.

@jorgecarleitao jorgecarleitao merged commit 659433e into main Nov 22, 2021
@jorgecarleitao jorgecarleitao deleted the csv_tz branch November 22, 2021 21:56
@jorgecarleitao jorgecarleitao changed the title Added support to write timestamps with timezones. Added support to write timestamps with timezones for CSV Nov 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature A new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant