pendulum
pendulum copied to clipboard
Add utc variant now for factory use
Using pendulum in pydantic has me writing code similar to Field(default_factory=lambda: now('UTC')) to ensure UTC regardless of system timezone settings. It would be nice to have a utcnow() variant that will allow for writing code similar to Field(default_factory=utcnow) ready and available with new versions of pendulum.
We really do need pendulum.utcnow() to handle a common use case and simplify how we approach things with Pydantic schemas and the like.
Nevermind.. looks like this exists as pendulum.datetime.DateTime.utcnow (after importing just DateTime)