Fixed issue with timezone conversion in formatter

related to #5128