25.06.2024, 06:52
Time is in UTC so you need to convert local date/time to UTC timestamp:
os.date() format string must be prefixed with ! to convert UTC timestamp to local date/time value:
Code:
local date = os.date('*t')
local time = os.time(date, true) -- UTC timestamp
local daterange = {
['start'] = time - 3 * 60 * 60,
['end'] = time,
}
os.date() format string must be prefixed with ! to convert UTC timestamp to local date/time value:
Code:
os.date('!%d %m %Y %H:%M',value[1])