René's URL Explorer Experiment


Title: Using Python's datetime Module (Summary) (Video) – Real Python

Open Graph Title: Using Python's datetime Module (Summary) – Real Python

Description: In the previous lesson, I showed you how to find the differences between datetime objects. This lesson summarizes the course and points you at some further information. I started out with the warning of how messy dates and times can be and then…

Open Graph Description: In the previous lesson, I showed you how to find the differences between datetime objects. This lesson summarizes the course and points you at some further information. I started out with the warning of how messy dates and times can be and then…

Opengraph URL: https://realpython.com/lessons/python-datetime-summary/

X: @realpython

direct link

Domain: realpython.com


Hey, it has json ld scripts:
  {
    "@context": "https://schema.org",
    "@type": "VideoObject",
    "name": "Using Python\u0027s datetime Module (Summary)",
    "description": "In the previous lesson, I showed you how to find the differences between datetime objects. This lesson summarizes the course and points you at some further information. I started out with the warning of how messy dates and times can be and then…",
    "thumbnailUrl": ["https://files.realpython.com/media/How-to-Use-Python-datetime-With-Examples_Watermarked.2676ca0aacf2.jpg"],
    "uploadDate": "2022-03-29T14:00:00+00:00",
    "duration": "PT3M4S",
    
    "potentialAction": {
      "@type": "SeekToAction",
      "target": "https://realpython.com/lessons/python-datetime-summary/#t={seek_to_second_number}",
      "startOffset-input": "required name=seek_to_second_number"
    }
  }
  

authorReal Python
twitter:cardsummary_large_image
twitter:imagehttps://files.realpython.com/media/How-to-Use-Python-datetime-With-Examples_Watermarked.2676ca0aacf2.jpg
og:imagehttps://files.realpython.com/media/How-to-Use-Python-datetime-With-Examples_Watermarked.2676ca0aacf2.jpg
twitter:creator@realpython
og:typevideo.episode

Links:

https://realpython.com/
Start Herehttps://realpython.com/start-here/
Learn Python https://realpython.com/lessons/python-datetime-summary/
Python Tutorials →In-depth articles and video courseshttps://realpython.com/search?kind=article&kind=course&order=newest
Learning Paths →Guided study plans for accelerated learninghttps://realpython.com/learning-paths/
Quizzes & Exercises →Check your learning progresshttps://realpython.com/quizzes/
Browse Topics →Focus on a specific area or skill levelhttps://realpython.com/tutorials/all/
Community Chat →Learn with other Pythonistashttps://realpython.com/community/
Office Hours →Live Q&A calls with Python expertshttps://realpython.com/office-hours/
Podcast →Hear what’s new in the world of Pythonhttps://realpython.com/podcasts/rpp/
Books →Round out your knowledge and learn offlinehttps://realpython.com/products/books/
Reference →Concise definitions for common Python termshttps://realpython.com/ref/
Code Mentor →BetaPersonalized code assistance & learning toolshttps://realpython.com/mentor/
Unlock All Content →https://realpython.com/account/join/
More https://realpython.com/lessons/python-datetime-summary/
Learner Storieshttps://realpython.com/learner-stories/
Python Newsletterhttps://realpython.com/newsletter/
Python Job Boardhttps://www.pythonjobshq.com
Meet the Teamhttps://realpython.com/team/
Become a Tutorial Writerhttps://realpython.com/write-for-us/
Become a Video Instructorhttps://realpython.com/become-an-instructor/
Searchhttps://realpython.com/search
https://realpython.com/search
Joinhttps://realpython.com/account/join/
Sign‑Inhttps://realpython.com/account/login/?next=%2Flessons%2Fpython-datetime-summary%2F
Unlock This Lessonhttps://realpython.com/account/join/?utm_source=rp_lesson&utm_content=python-datetime-module
Unlock This Lessonhttps://realpython.com/account/join/?utm_source=rp_lesson&utm_content=python-datetime-module
https://realpython.com/courses/python-datetime-module/#team
Using Python's datetime Modulehttps://realpython.com/courses/python-datetime-module/
Christopher Trudeauhttps://realpython.com/courses/python-datetime-module/#team
Recommended Tutorialhttps://realpython.com/python-datetime/
Course Slides (.pdf)https://realpython.com/courses/python-datetime-module/downloads/python-datetime-module-slides/
Sample Code (.zip)https://realpython.com/courses/python-datetime-module/downloads/python-datetime-module-sample-code/
Ask a Questionhttps://realpython.com/lessons/python-datetime-summary/#discussion
https://realpython.com/feedback/survey/course/python-datetime-module/liked/?from=lesson-title
https://realpython.com/feedback/survey/course/python-datetime-module/disliked/?from=lesson-title
Contentshttps://realpython.com/lessons/python-datetime-summary/#description
Transcripthttps://realpython.com/lessons/python-datetime-summary/#transcript
Discussion (6)https://realpython.com/lessons/python-datetime-summary/#discussion
Your Calendar Fallacy Is…https://yourcalendricalfallacyis.com/
Stackoverflow: Daylight saving time and time zone best practiceshttps://stackoverflow.com/questions/2532729/daylight-saving-time-and-time-zone-best-practices/2532962#2532962
Storing UTC Is Not A Silver Bullethttps://codeblog.jonskeet.uk/2019/03/27/storing-utc-is-not-a-silver-bullet/
The Complexity of Time Data Programminghttps://www.mojotech.com/blog/the-complexity-of-time-data-programming/
Unlock This Lessonhttps://realpython.com/account/join/?utm_source=rp_lesson_preview&utm_content=python-datetime-module
Sign-Inhttps://realpython.com/account/login/
Unlock This Lessonhttps://realpython.com/account/join/?utm_source=rp_lesson_preview&utm_content=python-datetime-module
Sign-Inhttps://realpython.com/account/login/
00:00https://realpython.com/lessons/python-datetime-summary/#t=0.51
In the previous lesson,https://realpython.com/lessons/python-datetime-summary/#t=0.51
I showed you how to find the differences between datetime objects.https://realpython.com/lessons/python-datetime-summary/#t=1.47
This lesson summarizes the course and points you at some further information.https://realpython.com/lessons/python-datetime-summary/#t=5.37
00:11https://realpython.com/lessons/python-datetime-summary/#t=11.44
I started out with the warning of how messy dates and times can behttps://realpython.com/lessons/python-datetime-summary/#t=11.44
and then showed you how to use four different Python standard libraries for datehttps://realpython.com/lessons/python-datetime-summary/#t=15.28
and time objects: time, datetime, zoneinfo,https://realpython.com/lessons/python-datetime-summary/#t=19.15
and timedelta. As the timedelta class is a bit limited,https://realpython.com/lessons/python-datetime-summary/#t=24.49
I showed you the dateutil package as a possible augment.https://realpython.com/lessons/python-datetime-summary/#t=29.35
00:34https://realpython.com/lessons/python-datetime-summary/#t=34.87
And throughout the course,https://realpython.com/lessons/python-datetime-summary/#t=34.87
I added to a script that calculates how much time has passed since the lasthttps://realpython.com/lessons/python-datetime-summary/#t=35.86
apocalypse.https://realpython.com/lessons/python-datetime-summary/#t=39.76
00:42https://realpython.com/lessons/python-datetime-summary/#t=42.65
In the description below, I’ve included several different articles about thehttps://realpython.com/lessons/python-datetime-summary/#t=42.65
messiness which is working with dates and times. Your Calendar Fallacy ishttps://realpython.com/lessons/python-datetime-summary/#t=45.95
a long list of things that people often think are true about dates,https://realpython.com/lessons/python-datetime-summary/#t=50.54
and as you might guess from the title, well,https://realpython.com/lessons/python-datetime-summary/#t=54.56
they’re not. This Stackoverflow discussion has an excellenthttps://realpython.com/lessons/python-datetime-summary/#t=56.72
answerhttps://realpython.com/lessons/python-datetime-summary/#t=61.19
summarizing a lot of the best practices with daylight savings and time zones.https://realpython.com/lessons/python-datetime-summary/#t=61.82
01:07https://realpython.com/lessons/python-datetime-summary/#t=67.52
In the overview,https://realpython.com/lessons/python-datetime-summary/#t=67.52
I hinted that the Let’s use UTC to store things solutionhttps://realpython.com/lessons/python-datetime-summary/#t=68.48
isn’t always the right one. This article talks about some of the edge cases …https://realpython.com/lessons/python-datetime-summary/#t=72.77
and this is another perspective on the same topic.https://realpython.com/lessons/python-datetime-summary/#t=78.44
01:22https://realpython.com/lessons/python-datetime-summary/#t=82.76
This YouTube video from Computerphile covers a lot of similar topicshttps://realpython.com/lessons/python-datetime-summary/#t=82.76
if you’d rather watch than read.https://realpython.com/lessons/python-datetime-summary/#t=86.72
And finally, a comprehensive article on all this messiness.https://realpython.com/lessons/python-datetime-summary/#t=89.96
01:35https://realpython.com/lessons/python-datetime-summary/#t=95.83
Because Python’s date/time libraries are a little lightweight,https://realpython.com/lessons/python-datetime-summary/#t=95.83
there are loads of third-party libraries out there to compensate. Links to thesehttps://realpython.com/lessons/python-datetime-summary/#t=98.77
projects are in the description below. pytz was the solution tohttps://realpython.com/lessons/python-datetime-summary/#t=102.85
time zones in Python before zoneinfo existed.https://realpython.com/lessons/python-datetime-summary/#t=107.8
01:51https://realpython.com/lessons/python-datetime-summary/#t=111.82
I’d suggest using the standard-library solution instead,https://realpython.com/lessons/python-datetime-summary/#t=111.82
but this one is definitely still out there in the wild,https://realpython.com/lessons/python-datetime-summary/#t=114.79
so you might want to be familiar with it. Now,https://realpython.com/lessons/python-datetime-summary/#t=117.73
here are three different drop-in replacements for datetime.https://realpython.com/lessons/python-datetime-summary/#t=121.45
02:04https://realpython.com/lessons/python-datetime-summary/#t=124.78
They provide compatible methods as well as all sorts of other capabilities.https://realpython.com/lessons/python-datetime-summary/#t=124.78
Arrow, Pendulum, and interestingly enough, Maya.https://realpython.com/lessons/python-datetime-summary/#t=130.0
02:16https://realpython.com/lessons/python-datetime-summary/#t=136.36
In a previous lesson,https://realpython.com/lessons/python-datetime-summary/#t=136.36
I mentioned dateparser, used to parse human-readable time concepts, like tomorrow,https://realpython.com/lessons/python-datetime-summary/#t=137.29
and having some of my childhood overlapping with the eighties,https://realpython.com/lessons/python-datetime-summary/#t=143.23
the name of this module always just makes me smile.https://realpython.com/lessons/python-datetime-summary/#t=146.53
02:29https://realpython.com/lessons/python-datetime-summary/#t=149.56
This one, Delorean, mixes the human-readable concepts of dateparser with the timehttps://realpython.com/lessons/python-datetime-summary/#t=149.56
delta concepts of dateutil.https://realpython.com/lessons/python-datetime-summary/#t=154.0
Finally, pywhen. Full disclosure: this is one of mine.https://realpython.com/lessons/python-datetime-summary/#t=155.53
02:40https://realpython.com/lessons/python-datetime-summary/#t=160.66
It’s a very lightweight library that just wraps the construction of datetimehttps://realpython.com/lessons/python-datetime-summary/#t=160.66
objects.https://realpython.com/lessons/python-datetime-summary/#t=164.35
I was doing some work a while back where fractional sections and Unix epochs werehttps://realpython.com/lessons/python-datetime-summary/#t=165.46
important and found nothing else did what I needed. So I threw this together.https://realpython.com/lessons/python-datetime-summary/#t=169.45
02:56https://realpython.com/lessons/python-datetime-summary/#t=176.08
Thanks for your attention. I hope you had a good time. See what I did there?https://realpython.com/lessons/python-datetime-summary/#t=176.08
Dad joke for the win.https://realpython.com/lessons/python-datetime-summary/#t=181.42
May 24, 2022https://realpython.com/lessons/python-datetime-summary/#comment-414e5231-aa99-4197-bae7-700f5c7f3bb5
May 24, 2022https://realpython.com/lessons/python-datetime-summary/#comment-bf5cc0ca-57e5-41df-8b93-add03de0e10b
July 11, 2022https://realpython.com/lessons/python-datetime-summary/#comment-e86336f1-aca8-4ba4-9618-bc8ef74cc8a9
July 12, 2022https://realpython.com/lessons/python-datetime-summary/#comment-21548bf0-1673-42f8-96a8-14d931a796f6
Aug. 29, 2022https://realpython.com/lessons/python-datetime-summary/#comment-46c25bcc-1674-403e-bcb6-b07f078e87f0
May 1, 2023https://realpython.com/lessons/python-datetime-summary/#comment-b4106ac3-a4d0-4ebd-b314-13ddc654a765
docs.python.org/3/library/zoneinfo.html#data-sourceshttps://docs.python.org/3/library/zoneinfo.html#data-sources
Become a Memberhttps://realpython.com/account/join/
https://realpython.com/lessons/date-time-arithmetic/
Overviewhttps://realpython.com/courses/python-datetime-module/
Using Python's datetime Module (Overview) 02:37 https://realpython.com/videos/python-datetime-module-overview/
Understanding That Dates and Times Are Messy 07:33 https://realpython.com/videos/messy-date-time/
Introducing datetime 06:13 https://realpython.com/lessons/introducing-datetime/
Dealing With Time Zones 10:44 https://realpython.com/lessons/dealing-with-time-zones/
Doing Date and Time Arithmetic 05:48 https://realpython.com/lessons/date-time-arithmetic/
Using Python's datetime Module (Summary) 03:04 https://realpython.com/lessons/python-datetime-summary/
Privacy Policyhttps://realpython.com/privacy-policy/

Viewport: width=device-width, initial-scale=1, shrink-to-fit=no, viewport-fit=cover

Robots: max-image-preview:large


URLs of crawlers that visited me.