python - Is there an object that compares smaller than any valid datetime.datetime(...)? -


is there min constant datetime?

i need represent expiration date of resource, , want have datetime represents "always expires" default value (instead of none can use same expiration comparison no matter what).

so right i'm using datetime.datetime(datetime.minyear,1,1,0,0,tzusc()) min datetime wonder if there other way represents "the lowest possible time" (even if it's not datetime).

you can try - datetime.datetime.min . according documentation -

datetime.min

the earliest representable datetime, datetime(minyear, 1, 1, tzinfo=none).


Comments

Popular posts from this blog

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

html - Outlook 2010 Anchor (url/address/link) -

android - How to create dynamically Fragment pager adapter -