Fix timestamp-to-wrapped jtt conversion function