Skip to content

addFile: fix utc_start_time/stop_time as dates with Unix time table - #36

Merged
dnadeau-lanl merged 1 commit into
spacepy:masterfrom
jtniehof:unixtime_add_start_date
Oct 19, 2020
Merged

dnadeau-lanl merged 1 commit into
spacepy:masterfrom
jtniehof:unixtime_add_start_date

Conversation

@jtniehof

Copy link
Copy Markdown
Member

addFile used to work if the utc_start_time or utc_stop_time were passed in as a date instead of datetime--it just put to midnight of that day. It's a little bit weird, but the inspector output tends to get passed straight to addFile and I managed to write a few inspectors that did this in some circumstances. I figured if I could make that mistake it might happen again. With #31 this no longer worked, since they were treated as datetimes before hitting the database. This PR explicitly converts to datetime.

PR Checklist

  • Pull request has descriptive title
  • Pull request gives overview of changes
  • (N/A) New code has inline comments where necessary
  • (N/A) Any new modules, functions or classes have docstrings consistent with dbprocessing style
  • (N/A) Major new functionality has appropriate Sphinx documentation
  • (N/A) Added an entry to CHANGELOG if fixing a major bug or providing a major new feature
  • New features and bug fixes should have unit tests
  • Relevant issues are linked in the description (e.g. See issue # or Closes #)

 * Previously worked if utc_start_time/stop_time are date not datetime,
   so seems to make sense to keep that going.
@jtniehof

Copy link
Copy Markdown
Member Author

See #37 for an attempt to address root cause.

@dnadeau-lanl
dnadeau-lanl merged commit 333e47d into spacepy:master Oct 19, 2020
@jtniehof
jtniehof deleted the unixtime_add_start_date branch October 20, 2020 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants