from datetime import datetime ,timezone,timedelta print(datetime.now()) # not aware about time zones , local computer time print(datetime.now(timezone.utc)) # UTC TIME +00:00 meaning there is not offset today = datetime.now(timezone.utc) tomorrow = today + timedelta(days=1) print(tomorrow) print(today.strftime('%d-%m-%Y %H:%M:%S')) #user_date = input('Give time in YYYY-mm-dd format') #user_date = datetime.strptime(user_date,'%Y-%m-%d') #print(user_date) print(today.timestamp()) # linux timestamp
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter