Skip to content

Add timezone handling + datetime parsing #11

Description

@dillonwilliams

pacsman is currently configured with datetime_conversion = False and crashes if enabled (an integer is required (got type NoneType) on the line dataset.PatientBirthDate = None). Additionally, "Timezone Offset From UTC" is not fetched by default for any of the DicomInterface methods.

  1. Add datetime parsing utility functions in pacsman that take in DA and TM attribute, or a DT attribute, in addition to an optional offset attribute. The local timezone is added to the return datetime if no offset is present.*

  2. Try to get PynetdicomClient and FilesystemDicomClient working correctly with datetime_conversion set to True. If there's some problem, check the config and throw an exception if set to true.

*From the standard:
"A Date Time value without the optional suffix is interpreted to be in the local time zone of the application creating the Data Element, unless explicitly specified by the Timezone Offset From UTC (0008,0201)"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions