Other modules dealing with time values can only track time to a single second. Many competitions such as swimming, running and speed skating track results down to the hundredths or thousandths of a second. The racetime module allows you to store time values up to the thousandths of a second.

Racetime creates a field that allows the user to store race times in the format [hh:][mm:]ss.t[tt], where h is an optional hours value and m is an optional minutes value, s is the number of seconds and t is the fraction of a second. The fractional part of the field is configurable, allowing you to track tenths, hundredths or thousandths of a second.

Values are stored in the database as an integer value. A time like 1:15.20 is stored in the database as 7520. The module converts the time to the number of seconds and then multiplies it by the number of decimal places configured for the field. The value is stored in a database field called time.

Project information

Releases