Skip to content

Commit

Permalink
Fix 12th hour in 12h clock format
Browse files Browse the repository at this point in the history
  • Loading branch information
falzonv committed Nov 29, 2021
1 parent 9eb4db9 commit a4ca442
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,11 @@ else if(clock_format.equals("datetime"))
{
// Prepare the time text according to the selected format
String time_text ;
if(clock_format.startsWith("h:")) time_text = hour12 + ":" ;
if(clock_format.startsWith("h:"))
{
if(hour12 == 0) time_text = "12:" ;
else time_text = hour12 + ":" ;
}
else time_text = ((hour24 < 10) ? "0" : "") + hour24 + ":" ;
time_text += ((minute < 10) ? "0" : "") + minute ;
if(clock_format.equals("h:mm a"))
Expand Down

0 comments on commit a4ca442

Please sign in to comment.