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,10 +1,11 @@
|
|||
from datetime import datetime
|
||||
from datetime import datetime, timezone
|
||||
|
||||
from flask import render_template, url_for, flash, redirect, Response, Blueprint
|
||||
import sqlalchemy
|
||||
from flask import (Blueprint, Response, flash, redirect, render_template,
|
||||
url_for)
|
||||
from flask.typing import ResponseReturnValue
|
||||
from flask_wtf import FlaskForm
|
||||
import sqlalchemy
|
||||
from wtforms import StringField, BooleanField, SubmitField
|
||||
from wtforms import BooleanField, StringField, SubmitField
|
||||
from wtforms.validators import DataRequired
|
||||
|
||||
from app.extensions import db
|
||||
|
@ -72,7 +73,7 @@ def group_edit(group_id: int) -> ResponseReturnValue:
|
|||
if form.validate_on_submit():
|
||||
group.description = form.description.data
|
||||
group.eotk = form.eotk.data
|
||||
group.updated = datetime.utcnow()
|
||||
group.updated = datetime.now(tz=timezone.utc)
|
||||
try:
|
||||
db.session.commit()
|
||||
flash("Saved changes to group.", "success")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue