feat: switch all timezone naive datetimes to timezone aware
This commit is contained in:
parent
41fc0a73a5
commit
e22abb383c
30 changed files with 322 additions and 226 deletions
|
@ -1,11 +1,12 @@
|
|||
from datetime import datetime
|
||||
from datetime import datetime, timezone
|
||||
from typing import Optional
|
||||
|
||||
from flask import Blueprint, flash, Response, render_template, redirect, url_for
|
||||
from flask import (Blueprint, Response, flash, redirect, render_template,
|
||||
url_for)
|
||||
from flask.typing import ResponseReturnValue
|
||||
from flask_wtf import FlaskForm
|
||||
from sqlalchemy import exc
|
||||
from wtforms import StringField, SelectField, SubmitField
|
||||
from wtforms import SelectField, StringField, SubmitField
|
||||
from wtforms.validators import DataRequired
|
||||
|
||||
from app.extensions import db
|
||||
|
@ -70,7 +71,7 @@ def webhook_edit(webhook_id: int) -> ResponseReturnValue:
|
|||
webhook.description = form.description.data
|
||||
webhook.format = form.description.data
|
||||
webhook.url = form.description.data
|
||||
webhook.updated = datetime.utcnow()
|
||||
webhook.updated = datetime.now(tz=timezone.utc)
|
||||
try:
|
||||
db.session.commit()
|
||||
flash("Saved changes to webhook.", "success")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue