(fmt)
| 265 | # Issue #13305: different format codes across platforms |
| 266 | _day0 = datetime(1, 1, 1) |
| 267 | def _try(fmt): |
| 268 | try: |
| 269 | return _day0.strftime(fmt) == '0001' |
| 270 | except ValueError: |
| 271 | return False |
| 272 | if _try('%Y'): # Mac OS X |
| 273 | def _iso8601_format(value): |
| 274 | return value.strftime("%Y%m%dT%H:%M:%S") |