Skip to content

cli: drop utcnow() from latest_bill_update / latest_people_update writes#194

Open
c-tonneslan wants to merge 1 commit into
openstates:mainfrom
c-tonneslan:fix/cli-utcnow-deprecation
Open

cli: drop utcnow() from latest_bill_update / latest_people_update writes#194
c-tonneslan wants to merge 1 commit into
openstates:mainfrom
c-tonneslan:fix/cli-utcnow-deprecation

Conversation

@c-tonneslan

Copy link
Copy Markdown

Follow-up to #193. The two utcnow() call sites in cli/update.py and cli/people.py write to DateTimeFields that are saved naive, so swapping for datetime.now(timezone.utc).replace(tzinfo=None) keeps the on-the-wire shape identical.

Follow-up to the model/test cleanups - the two CLI write sites needed
the .replace(tzinfo=None) shape so the naive DateTimeField writes look
the same.

Signed-off-by: Charlie Tonneslan <cst0520@gmail.com>
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.

1 participant