Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metadata time zone flush to enforce timezone info #1874

Merged
merged 2 commits into from
Sep 13, 2023

Conversation

patrickdalla
Copy link
Collaborator

Some parsers load dates as Calendar objects, but, although with correct timezone info loaded, doesn't have the other fields recomputed after this correct timezone is set. As the TIKA Metadata class implementation subsequently set the timezone to UTC to normalize all timezones, when the computeFields of calendar is called later, the original timezone info was lost, resulting in not applying the correct timezone offset correction.

This PR forces the computation of the fields before any subsequente Calendar operation.

@patrickdalla patrickdalla linked an issue Sep 12, 2023 that may be closed by this pull request
@lfcnassif
Copy link
Member

Thanks @patrickdalla!

@lfcnassif lfcnassif merged commit ef18f22 into master Sep 13, 2023
2 checks passed
@lfcnassif lfcnassif deleted the Metadata_TimeZone_Flush branch September 13, 2023 11:16
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.

PDF xmp timestamps aren't extracted with timezone info
2 participants