Hi, do i something wrong
print(os.date("%Y-%m-%d %H:%m:%S", os.time(t)))
t.day = t.day + 1
t.hour = 7
t.min = 0
t.sec = 0
print(os.date("%Y-%m-%d %H:%m:%S", os.time(t)));
the day should be one day later, and 7:00:00
but i always get one day later and 7:02:00
???
i can not set the minute… is that a bug
greets
chris
Use this as your base function (returns time in seconds)
local function parseTime(dateString) local pattern="(%d+)%-(%d+)%-(%d+)%a(%d+)%:(%d+)%:([%d%.]+)([Z%p])" local xyear,xmonth,xday,xhour,xminute,xseconds=string.match(dateString,pattern) local newTimestamp=os.time({year=xyear,month=xmonth,day=xday,hour=xhour,min=xminute,sec=xseconds}) return newTimestamp end parseTime(os.date("!%FT%XZ"))