From 813f484b9c8fdc6896ac332f827fb2cab6934e15 Mon Sep 17 00:00:00 2001 From: akasma74 Date: Fri, 14 Feb 2020 07:22:06 +0000 Subject: [PATCH] time section: tweaks (#12077) 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 c15caf07ef9..dfca2518f23 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