Skip to content
This repository was archived by the owner on Mar 24, 2025. It is now read-only.

Use defined timezone on write for formats that need TZ info#665

Merged
srowen merged 2 commits intodatabricks:masterfrom
srowen:Issue663
Oct 10, 2023
Merged

Use defined timezone on write for formats that need TZ info#665
srowen merged 2 commits intodatabricks:masterfrom
srowen:Issue663

Conversation

@srowen
Copy link
Copy Markdown
Collaborator

@srowen srowen commented Oct 9, 2023

Closes #663

@srowen srowen added the bug label Oct 9, 2023
@srowen srowen self-assigned this Oct 9, 2023
@srowen srowen merged commit 6969262 into databricks:master Oct 10, 2023
@srowen srowen deleted the Issue663 branch October 10, 2023 13:36
case (TimestampType, v: Timestamp) =>
val formatter = options.timestampFormat.map(DateTimeFormatter.ofPattern).
getOrElse(DateTimeFormatter.ISO_INSTANT)
getOrElse(DateTimeFormatter.ISO_INSTANT).
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, I don't think this affects the port of spark-xml to Apache Spark. That code was modified to use Spark's more standard timestamp formatter code that always has a timezone available, it seems.

@srowen srowen added this to the 0.18.0 milestone Apr 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot write dataframe with custom timestampFormat

2 participants