Fix time zones in custom time encoding