contact: Fix issues with tox_id
utils: Add function to check if to use 24h format

We use the 24h format when the interface clock-format is set to 24h or
when the current locale doesn't have am/pm strings.