From 36becf6b5d09bcc80761dff289c1018dd0d6b3fa Mon Sep 17 00:00:00 2001 From: akasma74 Date: Thu, 13 Feb 2020 20:52:39 +0000 Subject: [PATCH] time section: tweaks Added empty string before notes and enclosed the example in {%raw%}{%endraw%} --- source/_docs/configuration/templating.markdown | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/_docs/configuration/templating.markdown b/source/_docs/configuration/templating.markdown index c15caf07ef98..dfca2518f234 100644 --- a/source/_docs/configuration/templating.markdown +++ b/source/_docs/configuration/templating.markdown @@ -179,10 +179,14 @@ The same thing can also be expressed as a filter: - Filter `timestamp_local` converts an UNIX timestamp to its string representation as date/time in your local timezone. - Filter `timestamp_utc` converts a UNIX timestamp to its string representation representation as date/time in UTC timezone. - Filter `timestamp_custom(format_string, local_time=True)` converts an UNIX timestamp to its string representation based on a custom format, the use of a local timezone is default. Supports the standard [Python time formatting options](https://docs.python.org/3/library/time.html#time.strftime). + Note: [UNIX timestamp](https://en.wikipedia.org/wiki/Unix_time) is the number of seconds that have elapsed since 00:00:00 UTC on 1 January 1970. Therefore, if used as a function's argument, it can be substituted with a numeric value (`int` or `float`): + +{% raw %} ```yaml {{ 120 | timestamp_local }} ``` +{% endraw %} ### To/From JSON