New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert bag metadata datetime fields to date fields #506
Comments
Converted the DateTime fields to Date fields in the BagInfoMetadata model. After a refresh and taking a look at the metadata section in the transfers detail view, it seems bagging_date was pushed forward five hours while date_start and date_end were pushed four. Before field change: After field change: Going to grab a burrito 🌯 but will be looking through bag_transfers to see what could be causing this afterwards. |
@McDaPick Hey, thanks for working on this! I'm guessing there is some timezone/daylight savings time stuff going on. I would suggest the following:
|
You would not believe how long that burrito line was! Jumped back into this and believe I found the issue above. 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 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
Updating this value to UTC allowed for the
Transfer's Bag Info: External Identifier: records-2017-12-11T20:09:48.238148 The Transfer's data through the Django shell after
Inside of the Transfer's detail view: Side Note: This update to the I pushed up a branch and submitted a PR with the changes. Pull Request #634 |
This all makes sense @McDaPick! My only question is if that burrito was worth the wait? |
I'd wait until the end of my days for a large double queso! 🌯🌯 |
Is your feature request related to a problem? Please describe.
Bag metadata date fields use Django datetime fields. This is confusing for end users.
Describe the solution you'd like
Convert datetime fields to date fields.
Additional context
Will need to investigate how this impacts existing data.
The text was updated successfully, but these errors were encountered: