Skip to content

Commit

Permalink
Minor: expose timestamp_tz_format for csv writing
Browse files Browse the repository at this point in the history
  • Loading branch information
tmi committed Jun 14, 2024
1 parent e8285be commit 55ceefb
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions arrow-csv/src/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,17 @@ impl WriterBuilder {
self.timestamp_format.as_deref()
}

/// Set the CSV file's timestamp tz format
pub fn with_timestamp_tz_format(mut self, tz_format: String) -> Self {
self.timestamp_tz_format = Some(tz_format);
self
}

/// Get the CSV file's timestamp tz format if set, defaults to RFC3339
pub fn timestamp_tz_format(&self) -> Option<&str> {
self.timestamp_tz_format.as_deref()
}

/// Set the value to represent null in output
pub fn with_null(mut self, null_value: String) -> Self {
self.null_value = Some(null_value);
Expand Down

0 comments on commit 55ceefb

Please sign in to comment.