Lua defies Lua 5.2 Reference Manual

For Lua blocks, it’s important to be able to construct DateTime strings in ISO 8601 format to use with REST API methods.

This sample Lua shows my problem. Any help or hints gratefully accepted :slight_smile:

now = os.time()
now_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 ='%FT%TZ', soon)

  'now '..tostring(now)..', soon '..tostring(soon),
  'now_date '..now_date..', soon_date '..soon_date,

@jsimmonds This is a good point. I will add it to my TODO list. You might want to bring this up to the luerl folks also.

In our case, we will probably just patch ontop of and re-implement the function to work. Either that, or we can create our own helper that uses a different name, such as :thinking:

1 Like

Thanks @RickCarlino.

Seems Connor already notified Robert Virding via this luerl issue ( still open ).
I might offer Robert a pointer to the official Lua manual :slight_smile: which states:

If format is not "*t", then date returns the date as a string,
formatted according to the same rules as the ISO C function strftime.
1 Like