Skip to content

Commit

Permalink
Fixed warning: "DeprecationWarning: datetime.datetime.utcnow() is dep…
Browse files Browse the repository at this point in the history
…recated and scheduled for removal in a future version".
  • Loading branch information
vmdocua committed Oct 18, 2023
1 parent d0b9f6b commit bf8c90b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:

- name: Run pytest
run: |
poetry run pytest --cov=. --cov-report=xml
poetry run pytest --cov=. --cov-report=xml -s
shell: bash

- name: Upload coverage reports to Codecov
Expand Down
2 changes: 1 addition & 1 deletion repromon_app/security.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def create_access_token(self, username: str, expire_sec: int = -1) -> str:
datetime.now(timezone.utc) + timedelta(seconds=expire_sec)
data = {
"sub": username,
"exp": expire
"exp": int(expire.timestamp())
}
logger.debug(f"data={str(data)}")
token: str = jwt.encode(data,
Expand Down

0 comments on commit bf8c90b

Please sign in to comment.