Another way to get for a lua-script the components of the utc-timestring.
Timestring (at the end of the script-segment) is a compilation of components as required for
some uploads:
therefore insertion of character 20 as required for complete year-identification, and of separators %20 and %3A.
Code: Select all
-- Line xx, Get Time-related data in UTC
utc_dtime = os.date("!%m-%d-%y %H:%M:%S",os.time())
month = string.sub(utc_dtime, 1, 2)
day = string.sub(utc_dtime, 4, 5)
year = "20" .. string.sub(utc_dtime, 7, 8)
hour = string.sub(utc_dtime, 10, 11); hour_n = tonumber(hour)
minutes = string.sub(utc_dtime, 13, 14); minutes_n = tonumber(minutes)
seconds = string.sub(utc_dtime, 16, 17)
timestring = year .. "-" .. month .. "-" .. day .. "%20" .. hour .. "%3A" .. minutes .. "%3A" .. seconds