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

handles metadata timezone differences in sas #309

Merged
merged 2 commits into from
Feb 17, 2024
Merged

Conversation

SInginc
Copy link
Contributor

@SInginc SInginc commented Jan 11, 2024

Dear maintainers and reviewers,

  • Previously, it is known that dataset creation/modification time is stored in the header of a SAS dataset. It is assumed that these 2 datetimes are saved as UTC timezone.
  • After an investigation, it turns out that SAS will store local time instead of UTC time in the header under some circumstances.

To address this:

  1. Found the place where SAS store the timezone difference
  2. Convert local time back to UTC time

This PR will:

  1. Reads timezone difference (which is stored just after the creation/modification time place)
  2. Convert local time to UTC time:
    • Timezone difference is store as seconds between UTC and local time with sign. E.g., Eastern Standard time (UTC-5) is -18000.
    • So, local time minus timezone difference is UTC time (local_time = UTC + diff).

@evanmiller
Copy link
Contributor

If you remove the commented-out code, this should be good to merge. Thanks!

@SInginc
Copy link
Contributor Author

SInginc commented Jan 12, 2024

If you remove the commented-out code, this should be good to merge. Thanks!

Hi @evanmiller , the commented-out code has been removed.

Thank you!

@evanmiller evanmiller merged commit 38d4418 into WizardMac:dev Feb 17, 2024
12 of 14 checks passed
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.

2 participants