UTC time

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

Post Reply
kratax
Posts: 21
Joined: Tuesday 30 April 2019 12:01
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

UTC time

Post by kratax »

Hi,
I have a simple question, how to get current time in UTC format within dzvent script? (to be used as a part of URL later on).
Thanks!
Kratax
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: UTC time

Post by waaren »

kratax wrote: Tuesday 30 April 2019 12:57 How to get current time in UTC format within dzvent script?
local UTC = os.date("!*t")
print("UTC Time ==>> " .. os.date("%A, %d %B %Y (%H:%M:%S)",os.time(UTC)))

for more time examples (in and out dzVents) have a look here
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest