Commit graph

3 commits

Author SHA1 Message Date
William Wilgus
f456dbfa52 [Bugfix] FS#13902 lua strfrtime wrong month field, did not add one to month
posix month field is called mon not month
mon goes from 0-11 so strfrtime needs to add 1 to the number for %m
day of week goes 0-6 where 0 = sunday
day of year goes 0-365 (365 on a leap year)

according to lua everything starts at 1
so month is 1-12
day of week goes 1-7 1 = sunday
day of year is 1-365 (366 on a leap year)

added some fields in the time_date example

Change-Id: Icd502b172285d23133488aa3456786d756667bfa
2026-05-22 18:10:36 -04:00
William Wilgus
7c2e84ad2f FS#13898 expand date_time.lua example
os.date(*t) did not return table when *t supplied because
require("strfrtime.lua") was not loaded

Change-Id: I89b02adad633dca0106b571bdb4b10ffb39cbcf6
2026-05-16 15:54:42 -04:00
William Wilgus
ded29fd751 lua plugin remove strfrtime in favor of strfrtm.lua
saves 2.2k on the bin

also supplies gmtime, and a test script to check the returned time/dates

Change-Id: Ib83b11d89bdf44a50830ff51c72ac6395b675603
2026-01-08 21:39:54 -05:00