Use datetime.now() instead of datetime.today()

Proprietary

Replace datetime.today() with datetime.now(). Both are equivalent, but now() is more explicit and supports timezone arguments. It only fires where the receiver's type resolves to datetime.datetime itself, and leaves alone date and a subclass that may override today.

org.openrewrite.python.cleanup.UseDatetimeNowNotToday
mod run . --recipe=org.openrewrite.python.cleanup.UseDatetimeNowNotToday

Install it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.