Closed helrond closed 8 months ago
OK @McDaPick I had to do a few additional things to get this to pass CI:
If you're good with this I can push this through development
and into base
.
Hi @helrond !
Thank you so much, that sounds great to me. I'll make a note of the updates you made for the future.
Let me know if I can lend a hand anywhere else!
This PR is from @McDaPick 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.