Convert to using UTC throughout code and converting to local time in interface

Issue #95 new
Ed McDonagh created an issue

Maybe introduce new aware datetime database fields where we currently have date and time as separate fields.

Turn USE_TZ to True

Move TIME_ZONE to local_settings

Test with both postgresql and other databases as postgres will use UTC whether it is offered or not, the others will use what they are given.

Comments (3)

  1. Ed McDonagh reporter

    Fixes DST offset problem for naturaltime when using an SQLite database, need to confirm with postgresql. Medium to long term need to convert to UTC on import, store and work as UTC, then display in localtime (refs #95). Refs #74.

    → <<cset 3a2fc1723172>>

  2. Tim de Wit

    Time zone of openrem server and locally acquired data are usually the same I guess? In order to find out which time zone is used inside the StudyTime dicom tag an optional dicom tag (0008,0201) can be used. If not present, local time can be assumed. (source:!topic/comp.protocols.dicom/-skycy7S-e4)
    Things can get tricky though... which timezone offset from utc (0008,0201) should be used when using qrscu to retrieve data? Perhaps assuming the use of local date time everywhere, according to the specified TIME_ZONE in is the most pragmatic solution?

  3. Log in to comment