mirror of
https://github.com/home-assistant/core.git
synced 2025-05-07 15:39:18 +00:00
Revert "add timestamp to short time"
This reverts commit 1be50d83dcecb8a5609df3f0b2bd78fad1087f6e. Conflicts: homeassistant/util/dt.py
This commit is contained in:
parent
1e5e06fef5
commit
c8111b988e
@ -109,15 +109,6 @@ def str_to_datetime(dt_str):
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
def timestamp_to_short_time_str(timestamp):
|
|
||||||
""" Converts a UNIX timestamp to a short time string format.
|
|
||||||
|
|
||||||
@rtype: str
|
|
||||||
"""
|
|
||||||
return dt.datetime.fromtimestamp(
|
|
||||||
int(timestamp)).strftime(TIME_SHORT_STR_FORMAT)
|
|
||||||
|
|
||||||
|
|
||||||
def strip_microseconds(dattim):
|
def strip_microseconds(dattim):
|
||||||
""" Returns a copy of dattime object but with microsecond set to 0. """
|
""" Returns a copy of dattime object but with microsecond set to 0. """
|
||||||
return dattim.replace(microsecond=0)
|
return dattim.replace(microsecond=0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user