Skip to content

Commit

Permalink
leave timezone refactor for next PR
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl committed Aug 16, 2023
1 parent 5ca0e73 commit 8a1f4f4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions util/parse_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
from lingua_franca.parse import extract_datetime, extract_duration, normalize
from ovos_bus_client import Message
from ovos_utils.log import LOG
from ovos_utils.time import now_local, get_config_tz

from . import AlertPriority, Weekdays, AlertType
from .alert import Alert
Expand Down Expand Up @@ -309,14 +308,14 @@ def parse_repeat_from_message(message: Message,

def parse_end_condition_from_message(message: Message,
tokens: Optional[list] = None,
timezone: dt.tzinfo = get_config_tz()) \
timezone: dt.tzinfo = dt.timezone.utc) \
-> Optional[dt.datetime]:
"""
Parses an end condition from the utterance. If tokens are provided, handled
tokens are removed.
:param message: Message associated with intent match
:param tokens: optional tokens parsed from message by `tokenize_utterances`
:param timezone: timezone of request, defaults to config tz
:param timezone: timezone of request, defaults to utc
:returns: extracted datetime of end condition, else None
"""
tokens = tokens or tokenize_utterance(message)
Expand Down

0 comments on commit 8a1f4f4

Please sign in to comment.