Skip to content

fix: when FileCreationTime is blank use 0000#1778

Open
adamdecaf wants to merge 1 commit intomoov-io:masterfrom
adamdecaf:fix-filecreation-time-overwrite
Open

fix: when FileCreationTime is blank use 0000#1778
adamdecaf wants to merge 1 commit intomoov-io:masterfrom
adamdecaf:fix-filecreation-time-overwrite

Conversation

@adamdecaf
Copy link
Copy Markdown
Member

@adamdecaf adamdecaf commented Apr 28, 2026

On read of a file if there's no FileCreationTime use 0000 instead of the wall clock time (when the blank is formatted).

If both Date and Time are empty use the wall clock time.

Context: https://moov-io.slack.com/archives/CD9J8EJKX/p1777017836830609

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the overwriteDateTimeFields method to ensure a consistent "0000" value is set for FileCreationTime when it is missing or empty in JSON requests, preventing issues with wall clock time formatting. Corresponding tests were updated and a new test case was added. The review suggests using strings.TrimSpace to more robustly handle whitespace-only strings.

Comment thread file.go Outdated
@adamdecaf adamdecaf force-pushed the fix-filecreation-time-overwrite branch from d33076d to fa57fcf Compare April 29, 2026 14:15
…n empty

On read of a file if there's no FileCreationTime use 0000 instead of
the wall clock time (when the blank is formatted).

We can't get away with 000000 for FileCreationDate so make it the
current day, which still allows for dedup across for a single day.
@adamdecaf adamdecaf force-pushed the fix-filecreation-time-overwrite branch from fa57fcf to 02e295e Compare April 29, 2026 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant