Skip to content

Conversation

@aknopper
Copy link
Contributor

-Found more instances of the deprecated utcnow function and changed to .now(datetime.UTC)

Copy link
Member

@mircealungu mircealungu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small request @aknopper

@aknopper aknopper changed the title Change utcnow to now(datetime.UTC) Change utcnow to now(datetime.timezone.utc) Nov 3, 2025
Copy link
Contributor Author

@aknopper aknopper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

made changes


def get_date(p):
return datetime.utcfromtimestamp(int(request.args.get(p)))
return datetime.fromtimestamp(int(request.args.get(p)),tz = datetime.datetime.now(datetime.timezone.utc))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one small change: the tz=... expects a timezone object not a datetime. can you fix this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok. no worries; i fixed it myself.

Copy link
Member

@mircealungu mircealungu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good.

@mircealungu mircealungu merged commit 1c2c532 into flask-dashboard:master Nov 14, 2025
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