def parse_date_local(date, milliseconds=True):
"""Parses dates from ISO8601 or Epoch formats to a standard datetime object
in the current local timezone.
**Note that this function should not be used in time calculations.**
**It is primarily intended for displaying dates and times to the user.**
Args:
date (str): A date string in either iso8601 or Epoch format.
milliseconds (bool): If True, then epoch times are treated as
millisecond values, otherwise they are evaluated as seconds.
Returns:
datetime: The parsed date time in local time.
"""
return parse_date_utc(date, milliseconds).astimezone(get_localzone())
评论列表
文章目录