Skip to Content
Intuitive Python
book

Intuitive Python

by David Muller
May 2021
Intermediate to advanced
142 pages
3h 37m
English
Pragmatic Bookshelf
Content preview from Intuitive Python

Handling Datetimes with Timezones

Python’s datetime module allows your programs to manipulate dates and times in high-level ways. You can, for example, use arithmetic to calculate the difference between dates and advance dates forward and backward through time.

This section introduces a particularly thorny part of the datetime library: dealing with timezones. You won’t need to know the ins and outs of the datetime module to follow along with this section, but feel free to consult the Python datetime docs if you are interested.[79]

Using datetime with and without Timezones

Python provides the datetime object to represent specific points in time (for example, October 11th 2020 at 7:42 p.m.). By design, Python allows users to work with two variants ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Pythonic Programming

Pythonic Programming

Dmitry Zinoviev
Python for Geeks

Python for Geeks

Muhammad Asif

Publisher Resources

ISBN: 9781680508635Errata Page