A Django web application to receive, virus check and validate transfers of digital archival records, and allow archivists to appraise and accession those records.
The Transfer's data through the Django shell after being imported:
>>> from bag_transfer.models import BagInfoMetadata
>>> x = BagInfoMetadata.objects.get(external_identifier="records-2017-12-11T20:09:48.238148")
>>> print(x.date_end)
2005-06-21
>>> print(x.date_start)
2003-05-13
Inside of the Transfer's detail view:
After reading @helrond comment about timezone/daylight, I started to take a look around and saw that config.py has the time zone set as America/New_York on line 15.
DJANGO_TIME_ZONE = "America/New_York" # TZ database name for local timezone (string)
Updating this value to UTC allowed for the date_fieldto save correctly.
DJANGO_TIME_ZONE = "UTC" # TZ database name for local timezone (string)
This PR is for Issue #506
After updating the date_start and date_end fields in the BagInfoMetadata model from
to
and running a migration, the date was being saved as one day earlier than what was in the bag-info file.
Transfer's Bag Info:
External Identifier: records-2017-12-11T20:09:48.238148 BagIt-Profile-Identifier: http://localhost:8000/api/bagit_profiles/2/ Bagging-Date: 2017-12-11T20:09:48.238148 Date-End: 2005-06-22 Date-Start: 2003-05-14
The Transfer's data through the Django shell after being imported:
Inside of the Transfer's detail view:
After reading @helrond comment about timezone/daylight, I started to take a look around and saw that
config.py
has the time zone set as America/New_York on line 15.Updating this value to UTC allowed for the
date_field
to save correctly.Transfer's Bag Info:
External Identifier: records-2017-12-11T20:09:48.238148 BagIt-Profile-Identifier: http://localhost:8000/api/bagit_profiles/2/ Bagging-Date: 2017-12-11T20:09:48.238148 Date-End: 2005-06-22 Date-Start: 2003-05-14
The Transfer's data through the Django shell after
DJANGO_TIME_ZONE
was updated:Inside of the Transfer's detail view:
Side Note:
This update to the
DJANGO_TIME_ZONE
also seems to fix thebagging_date
time being fives hours off of its value in bag-data.