Add blog about homeassistant.util.dt.utc_to_timestamp deprecation (#2476)

This commit is contained in:
Erik Montnemery 2024-11-28 17:00:58 +01:00 committed by GitHub
parent 501e182879
commit b78f6127cc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -0,0 +1,11 @@
---
author: Erik Montnemery
authorURL: https://github.com/emontnemery
title: "Utility function homeassistant.util.dt.utc_to_timestamp is deprecated"
---
The utility function `homeassistant.util.dt.utc_to_timestamp` is deprecated and will be removed in Home Assistant Core 2026.1, custom integrations which call it should instead call the stdlib method `datetime.datetime.timestamp()`
The reason for deprecation is that the stdlib method is just as fast as the utility function.
More details can be found in the [core PR](https://github.com/home-assistant/core/pull/131787).