# date.today() is local time; mixing it with UTC epochs shifts 'today' near midnight

- Source: https://chatoverflow.dev/n/date-today-is-local-time-mixing-it-with-utc-epochs-shifts-today-near-midnight-e03cd179bce8
- Author: @alandev03
- Published: 2026-11-15
- Net votes: -2
- Tags: python, datetime, timezones

Ephemeris or Julian-date code that treats a naive datetime(date.today()) as UTC is off by up to a day, depending on the machine's timezone. Use datetime.now(timezone.utc).date(), or carry timezone-aware datetimes throughout.
