X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/fd0ec55a5f85a97e420ad6e066d33c08e7c48c95..a4c0fe0485baffa8c2e07a070b21e2d9972ab818:/luatz/init.lua?ds=sidebyside diff --git a/luatz/init.lua b/luatz/init.lua index 8ab7cfc..1a6c835 100644 --- a/luatz/init.lua +++ b/luatz/init.lua @@ -17,10 +17,15 @@ _M.time_in = function ( tz , now ) return _M.get_tz ( tz ):localize ( now ) end +_M.now = function ( ) + local ts = _M.gettime.gettime ( ) + return _M.timetable.new_from_timestamp ( ts ) +end + --- C-like functions _M.gmtime = function ( ts ) - return _M.timetable.new_from_timestamp ( ts ):normalise ( ) + return _M.timetable.new_from_timestamp ( ts ) end _M.localtime = function ( ts )