Skip to content

Commit

Permalink
test: fixed deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikBjare committed Dec 15, 2024
1 parent f9b4fb6 commit 77f9978
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions gptme/prompts.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import logging
import platform
from collections.abc import Generator, Iterable
from datetime import datetime
from datetime import datetime, timezone
from pathlib import Path
from typing import Literal

Expand Down Expand Up @@ -243,7 +243,9 @@ def prompt_systeminfo() -> Generator[Message, None, None]:
def prompt_timeinfo() -> Generator[Message, None, None]:
"""Generate the current time prompt."""
# we only set the date in order for prompt caching and such to work
prompt = f"## Current Date\n\n**UTC:** {datetime.utcnow().strftime('%Y-%m-%d')}"
prompt = (
f"## Current Date\n\n**UTC:** {datetime.now(timezone.utc).strftime('%Y-%m-%d')}"
)
yield Message("system", prompt)


Expand Down

0 comments on commit 77f9978

Please sign in to comment.