# HG changeset patch # User jbe # Date 1352051492 -3600 # Node ID db7ad8e4f78bf3bfe0eaf62611a85a352d10ce2b # Parent 08c107cc4fce82f14c4f324797cad31da418acd0 Print 12:xx a.m., instead of 00:xx a.m. diff -r 08c107cc4fce -r db7ad8e4f78b framework/env/format/time.lua --- a/framework/env/format/time.lua Sun Nov 04 18:46:29 2012 +0100 +++ b/framework/env/format/time.lua Sun Nov 04 18:51:32 2012 +0100 @@ -45,6 +45,9 @@ if am_pm and hour > 12 then hour = hour - 12 end + if am_pm and hour == 0 then + hour = 12 + end result = string.gsub(result, "HH", function() return format.decimal(hour, { digits = 2 }) end)