ashivasubramanian / sc

Section Controller game
1 stars 1 forks source link

Time format is incorrect #41

Closed ashivasubramanian closed 1 year ago

ashivasubramanian commented 5 years ago

What should happen: The hour/minute/second values must always be in HH:MM:SS, i.e., they should always be 2-digit values. Thus, single digit values should be left-padded with zeros.

What is happening: The time shown on the top right of the screen does not show the seconds in the correct format. The correct format should be HH:MM:SS, but this is violated when the current hour/minute/second is between 0-9.

ashivasubramanian commented 1 year ago

Use the String.format() methods' formatting options to pad with extra zeros.