



Attributes: year, month,Ī duration expressing the difference between two date, time, (There is no notion of “leap seconds” here.)Īttributes: hour, minute, second, microsecond,Ī combination of a date and a time. Attributes: year, month, andĪn idealized time, independent of any particular day, assuming that every day dateĪn idealized naive date, assuming the current Gregorian calendar always was, andĪlways will be, in effect. The largest year number allowed in a date or datetime object. The smallest year number allowed in a date or datetime object. The datetime module exports the following constants: datetime. Standard suitable for every application aside from UTC. World are more political than rational, change frequently, and there is no Supporting timezones at deeper levels ofĭetail is up to the application. Represent simple timezones with fixed offsets from UTC, such as UTC itself or Only one concrete tzinfo class, the timezone class, is Time, the time zone name, and whether daylight saving time is in effect. These tzinfo objects capture information about the offset from UTC Objects have an optional time zone information attribute, tzinfo, thatĬan be set to an instance of a subclass of the abstract tzinfo class. Understand and to work with, at the cost of ignoring some aspects of reality.įor applications requiring aware objects, datetime and time Particular number represents metres, miles, or mass. Purely up to the program, just like it is up to the program whether a Whether a naive object representsĬoordinated Universal Time (UTC), local time, or time in some other timezone is Itself relative to other date/time objects. With sufficient knowledge of applicable algorithmic and political timeĪdjustments, such as time zone and daylight saving time information,Īn aware object can locate itself relative to other aware objects.Īn aware object represents a specific moment in time that is not open toĪ naive object does not contain enough information to unambiguously locate Whether or not they include timezone information. Aware and Naive Objects ¶ĭate and time objects may be categorized as “aware” or “naive” depending on Third-party library with expanded time zone and parsing support. Module zoneinfoĬoncrete time zones representing the IANA time zone database.
