Fix an incorrect check in datetime conversion
Merge remote-tracking branch 'upstream/refactor-syntax_unicode' into refactor-syntax_unicode