LUA help with os time
This is my first post here :)
I have tried some LUA code from a tutorial, and time from a clock program
where source was provided.
Can anyone tell me why the '1' doesn't appear at the front for the time: 17:00 ?
time = os.time()
dateString = os.date("%c", time)
dateFields = os.date("*t", time)
day = dateFields.day
month = dateFields.month
year = dateFields.year
hour = dateFields.hour
min = dateFields.min
screen:blit(0, 0, blackbgnd, false)
screen:print(135, 14, hour .. ":" .. min .. ":" .. sec, green)
screen:print(285, 14, day .. "/" .. month .. "/" .. year, green)
With this code, if the time is 18:00, the time will appear as 8:00.
well that was rather obvious.
The os time doesn't have the correction for local time as it is displayed on the PSP menu screen.