Python 3 Datetime Library Script to Convert Current Date Time to Timezone

Python 3 Datetime Library Script to Convert Current Date Time to Timezone

Python 3 Datetime Library Script to Convert Current Date Time to Timezone

from datetime import datetime

# current date and time
now = datetime.now()

timestamp = datetime.timestamp(now)
print("timestamp =", timestamp)
Share on:

Hi, I'm Ranjith a full-time Blogger, YouTuber, Affiliate Marketer, & founder of Coding Diksha. Here, I post about programming to help developers.

Leave a Comment