Python Programming: The Ultimate Beginners Guide to Master Python Programming Step-By-Step with Practical Exercises by Reed Mark
Author:Reed, Mark [Reed, Mark]
Language: eng
Format: epub
Published: 2020-05-11T16:00:00+00:00
>>> current_local_time= time.localtime()
>>> current_local_time.tm_zone
'E. Africa Standard Time'
The localtime () returns the East Africa Standard Time Zone. The tm_zone determines the local time zone of your system.
Example 2:
>>> import time
>>> current_local_time= time.localtime()
>>> current_local_time.tm_gmtoff
10800
>>> current_local_time.tm_isdst
0
The current local time is 10800 seconds behind the GMT. Greenwich Mean Time (GMT) is a time zone without UTC offset (UTC± 00:00).
You can convert the 10800seconds to GMT by dividing with seconds per hour (3600). Thus the local time GMT +03:00 which corresponds to UTC +03:00.
If you ignore the secs argument when calling the localtime() , it will return the current local time in struct_time.
Converting Local Time Object to Seconds
To convert the local time object to seconds, mktime() is used. Mktime() accepts parameter t which is in the form of a normal tuple with nine elements or a struct_time object.
>>> import time
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Hands-On Python Deep Learning for the Web by Anubhav Singh(2031)
Mastering OpenCV 4 with Python by Fernández Villán Alberto;(1942)
Python Feature Engineering Cookbook by Soledad Galli(1798)
Building Serverless Python Web Services with Zappa by Abdulwahid Abdulhaque Barguzar(1740)
Python for Finance: Analyze Big Financial Data by Yves Hilpisch(1727)
Python for Finance Cookbook by Eryk Lewinson(1718)
Mastering Python Data Visualization by Kirthi Raman(1699)
PYTHON PROGRAMMING ADVANCED: The Guide for Data Analysis and Data Science. Discover Machine Learning With the Optimum Recipes for Mastering Python and ... (Crash Course Tips and Tricks Book 3) by ERIC MATTHEWS & LEWIS TAYLOR(1654)
Applied Deep Learning with Keras by Matthew Moocarme Mahla Abdolahnejad and Ritesh Bhagwat(1647)
Django 3 By Example by Antonio Melé(1611)
Supervised Machine Learning with Python by Taylor Smith(1595)
Interactive Data Visualization with Python by Anshu Kumar & Shubhangi Hora & Sharath Chandra Guntuku & Abha Belorkar(1448)
Hands-On GPU Programming with Python and CUDA by Dr. Brian Tuomanen(1360)
Hands-On Image Processing with Python by Sandipan Dey(1334)
Scientific Computing with Python 3 by Claus Fuhrer & Jan Erik Solem & Olivier Verdier(1322)
Flask Framework Cookbook by Shalabh Aggarwal(1298)
Python Deep Learning. by Ivan Vasilev(1272)
Training Systems using Python Statistical Modeling by Curtis Miller(1264)
Django 3 Web Development Cookbook - Fourth Edition by Aidas Bendoraitis(1258)
