Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

get unix time from datetime

import calendar
import datetime
 
date = datetime.datetime.utcnow()
utc_time = calendar.timegm(date.utctimetuple())
print(utc_time)
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #unix #time #datetime
ADD COMMENT
Topic
Name
8+7 =