fix DateTimeToLocalizedStringTransformer issue #7561, add tests