X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/66d1ace8410db940b6d1c74986626557ef8098ba..b7645320a1905587b16a8b2035481bbd45788175:/luatz/tzinfo.lua diff --git a/luatz/tzinfo.lua b/luatz/tzinfo.lua index 11248ad..5b7c0c0 100644 --- a/luatz/tzinfo.lua +++ b/luatz/tzinfo.lua @@ -4,6 +4,11 @@ local tz_info_methods = { } local tz_info_mt = { __index = tz_info_methods ; } +local tt_info_mt = { + __tostring = function ( self ) + return string.format ( "tt_info:%s=%d" , self.abbr , self.gmtoff ) + end ; +} -- Binary search local function _find_current ( tzinfo , target , i , j ) @@ -75,4 +80,5 @@ end return { tz_info_mt = tz_info_mt ; + tt_info_mt = tt_info_mt ; }