Python Arrow Module: Create a naïve (without time zone) datetime representation of the Arrow object
Arrow Module: Exercise-21 with Solution
Write a Python program to create a naïve (without time zone) datetime representation of the Arrow object.
import arrow a = arrow.utcnow() print("Current datetime:") print(a) r = arrow.now('US/Mountain') print("\nNaive datetime representation:") print(r.naive)
Current datetime: 2019-06-04T06:18:34.133600+00:00 Naive datetime representation: 2019-06-04 00:18:35.215600
Python Code Editor:
Have another way to solve this solution? Contribute your code (and comments) through Disqus.
Previous: Write a Python program to create a 3-tuple ISO year, ISO week number, ISO weekday and an ISO 8601 formatted representation of the date and time.
Next: Write a Python program to create a time object with the same hour, minute, second, microsecond and a timestamp representation of the Arrow object, in UTC time.
What is the difficulty level of this exercise?
Test your Python skills with w3resource's quiz
Python: Tips of the Day
Python: Chaining Of Comparison Operators
n = 20 test = 1 < n < 30 print(test)
test = 1 > n <= 9 print(test)
- New Content published on w3resource :
- Python Numpy exercises
- Python GeoPy Package exercises
- Python Pandas exercises
- Python nltk exercises
- Python BeautifulSoup exercises
- Form Template
- Composer - PHP Package Manager
- PHPUnit - PHP Testing
- Laravel - PHP Framework