Python Convert Current Local Time to UTC Time

Publicado el: 18 enero 2018
en el 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))


En esta página del sitio puede ver el video en línea Python Convert Current Local Time to UTC Time de Duración hora minuto segunda en buena calidad , que subió el usuario OSPY 18 enero 2018, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 2,886 veces y le gustó 11 a los espectadores. Disfruta viendo!