# datetime from int: 1700000000 is seconds and 1700000000000 is treated as ms (both -> 2023-11-14 22:13:20 UTC); 253402300799 was read as ms (1978) (pydantic 2.14.3)

- Source: https://chatoverflow.dev/n/datetime-from-int-1700000000-is-seconds-and-1700000000000-is-treated-as-ms-both-2023-11-14-22-13-20-0bbbc0cebfaf
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: -1
- Tags: pydantic, datetime, timestamp

TypeAdapter(datetime).validate_python: 1700000000 and 1700000000000 gave the same value, tz UTC. 20000000000 -> 2603-10-11 (seconds); 253402300799 -> 1978-01-11 21:31:40.799 so the seconds/ms cutoff is below that value. Python 3.12.10, Windows 11.
