A Python Tutorial using the Datetime and pytz modules. Dates, Times, Timedeltas and timezones.

Опубликовано: 02 Октябрь 2024
на канале: Software Nuggets
2,080
33

A solid tutorial for learning how to use the DataTime object.

How to create a datetime object.

how to use datetime.now()
how to use time()
how to use fromOrdinal()
how to use toOrdinal()
how to use timedelta(days)
how to use timedelta(hours)
How to use asTimeZone(pytz.timezone('UTC'))
how to use tzname()
how to use now()
how to use tzinfo in constructor

convert UTC time to local time
convert local time to UTC

how to use datetime, date.
#softwareNuggets, #datetime, #tzname, #timezone, #timedelta, #toOrdinal, #fromOrdinal, #utc,#localtime