ui.util.now

Get the current UTC datetime.

{%- call ui.util.call(show_example) -%} {%- raw %} {{ ui.util.now() }} {%- endraw %} {%- endcall %}

Result of the function is a datetime object, that can be used further.

{%- call ui.util.call(show_example) -%} {%- raw %} {%- set now = ui.util.now() -%} {{ now.strftime("%B, %Y") }}. New Year was {{ h.time_ago_from_timestamp(now.year ~ "-01-01") }} {%- endraw %} {%- endcall %}