For Lua blocks, it’s important to be able to construct DateTime strings in ISO 8601 format to use with my.farm.bot
REST API methods.
This sample Lua shows my problem. Any help or hints gratefully accepted
now = os.time()
now_date = os.date()
soon = 600 + math.ceil(now) -- now +10 minutes
-- Try to create a future date string ISO 8601 -style
-- -- this does NOT work
soon_date = os.date('%FT%TZ', soon)
send_message(
'success',
'now '..tostring(now)..', soon '..tostring(soon),
{'toast'}
)
send_message(
'warn',
'now_date '..now_date..', soon_date '..soon_date,
{'toast'}
)