The current code deals with 12/24h clock formats almost like a workaround of the issue. This commit adds proper support to different clock formats.