Because timezones are non-trivial and not just simple offsets, and not all use cases need to take timezones into account.
Not simple offsets
A timezone usually is not just an offset from UTC. Timezones may also dictate daylight savings time (when exactly does a timezone switch between summer and winter time), for example.
Not all use-cases need to handle DST, and sometimes you have string representations of datetime values that only include an offset from UTC. But that doesn't mean that you can assume that timezone handling in general only has to deal with an offset.
Timezones are not static entities
Timezones also change over time; what physical locations use what exact timezone can change, as well as the rules of a timezone. Because the Earth is a large place, this happens more often than you think. And not only can DST rules or geographical reach change, but so can the timezone offset. See Jon Skeet's highest voted answer for an example of a historical timezone change, where the database entries have been corrected over time as well.
Such changes certainly take place more often than Python releases can be made. As such, Python can't ship a comprehensive timezone database with the standard library and hope it'll stay up to date until the next release. Instead, the Python maintainers rely on third-party libraries to produce such a database; such libraries can follow a much more aggressive release cycle.
Not all use cases need timezones
However, many use cases involving datetime calculations do not need to include a timezone; they can and should be timezone agnostic. Forcing all such use cases to use a timezone anyway would put an undue burden on developers that then have to understand how to handle calculations with other datetime values that do include timezone information.
So, the datetime
library distinguishes between 'simple' datetime values without a timezone, and those with a timezone. Until Python 3.2, the library didn't even include a timezone
object; that was left to third-party libraries. The current datetime.timezone()
support is there to support simple offset timezones without history or DST support; those at least don't require constant maintenance and updates.
If you need access to proper timezones
The canonical Python implementation for timezones is the pytz
package, which packages the Olson database (used by UNIX-like OSes including Mac OS X). A new release is created whenever the Olson database is updated; I'd expect a new 2018-01 release to package the recent 2018c release.
Do take into account that the datetime
library design didn't anticipate having to handle historical timezone changes that pytz
includes with a timezone; do follow the pytz
documentation and use timezone.localize(naive_datetime)
to apply the correct offsets for the date. See How to make an unaware datetime timezone aware in python
The python-dateutil
package also contains timezone support.