this was my revised f-date.lua btw:
--[[
Functions that return Date/Time strings for use in CHDK Lua scripts.
Author: 2008/10/27 fudgey
Licence: GPL
--]]
-- Return a timestamp string (hh:mm:ss).
-- If called without parameters, uses current time from camera clock.
-- If a parameter (number) is passed, it is used (seconds after midnight).
function timestamp(t)
if t==nil then
return os.date("%X")
else
return os.date("%X",t)
end
end
-- Returns formatted date string from camera clock.
-- Output format example: 2008/09/25
function datestamp()
return os.date("%Y/%m/%d")
end
-- Returns formatted date + time string from camera clock.
-- Output format example: 2008/09/25 23:05:59
function datetimestamp()
return os.date("%Y/%m/%d %X")
end