Use datetime.now() instead of datetime.today()
ProprietaryReplace 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. UseDatetimeNowNotTodaymod run . --recipe= org. openrewrite. python. cleanup. UseDatetimeNowNotTodayInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.