Python Convert Current Local Time to UTC Time

Publicado em: 18 Janeiro 2018
no canal de: OSPY
2,886
11

Python How to Convert Current Local Time to UTC Time
import datetime
import time
current_local_time = datetime.datetime.now()
print "Current Local Time: ", current_local_time

current_utc_time = datetime.datetime.utcnow()
print "Current UTC Time: ", current_utc_time

##Local Time to UTC Time
current_local_time_timestamp = current_local_time.strftime("%s")
print "current_local_time_timestamp: ", current_local_time_timestamp

print "Current Local Time to UTC Time: ", datetime.datetime.utcfromtimestamp(float(current_local_time_timestamp))


Nesta página do site você pode assistir ao vídeo on-line Python Convert Current Local Time to UTC Time duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário OSPY 18 Janeiro 2018, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 2,886 vezes e gostou 11 espectadores. Boa visualização!