Skip to content

Timezone linter#1444

Open
MaximeBICMTL wants to merge 1 commit into
aces:mainfrom
MaximeBICMTL:timezone-linter
Open

Timezone linter#1444
MaximeBICMTL wants to merge 1 commit into
aces:mainfrom
MaximeBICMTL:timezone-linter

Conversation

@MaximeBICMTL

Copy link
Copy Markdown
Contributor

This PR adds the DTZ linting rules to our linter configuration, which notably forces Python code to handle timezones when creating a date.

Previously, our code did not handle timezones at all, making all datetime objects created with the system timezone.
With this PR, "absolute" datetimes (such as "now") are created and stored in the database with the UTC timezone. User-supplied timezone strings are parsed using a timezone aware-parser (dateutil) or with no timezone when not available (which uses the system timezone AFAIK).

@github-actions github-actions Bot added Language: Python Issue or PR related to the Python codebase Package: BIDS importer PR or issue related to the BIDS importer Package: DICOM importer PR or issue related to the DICOM importer Package: Utilities PR or issue related to the LORIS-agnostic utilities labels Jun 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Language: Python Issue or PR related to the Python codebase Package: BIDS importer PR or issue related to the BIDS importer Package: DICOM importer PR or issue related to the DICOM importer Package: Utilities PR or issue related to the LORIS-agnostic utilities

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant