model 14
Posts: 15
Joined: Thu Aug 22, 2019 11:52 am

using the datetime module in python3

Mon Sep 23, 2019 1:28 am

I am running Raspbian full on my pi 4B with wifi to the internet. When I run datetime.datetime.now() in a script or in the interpreter line I get random values out (except it does always say 2019). Is Raspbian keeping track of date and time via the internet connection? Would appreciate some help, thanks.

model 14
Posts: 15
Joined: Thu Aug 22, 2019 11:52 am

Re: using the datetime module in python3

Mon Sep 23, 2019 1:39 am

Please disregard my last post concerning datetime.

User avatar
rpdom
Posts: 17172
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: using the datetime module in python3

Mon Sep 23, 2019 6:27 am

Will you share your experience with us?

Raspbian should get the current date and time of day from time servers on the internet.

If you have had problems with that and solved them you may be able to help, or even just reassure, other people who may have the same issue or questions.
Unreadable squiggle

Return to “Python”