local time = getRealTime( )
if time.hour>12 then
Date = string.format( '%04d-%02d-%02d %02d:%02d', time.year + 1900, time.month + 1, time.monthday, (time.hour)..'pm', time.minute )
else
Date = string.format( '%04d-%02d-%02d %02d:%02d', time.year + 1900, time.month + 1, time.monthday, (time.hour)..'am', time.minute )
end
جرب