Advertisement
Fhernd

fechas-zonas-horarias.py

Jun 9th, 2018
1,886
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.37 KB | None | 0 0
  1. from datetime import datetime
  2. from pytz import timezone
  3.  
  4. fecha = datetime(2013, 3, 14, 17, 23, 29)
  5. print('Fecha base:', fecha)
  6.  
  7. bogota = timezone('America/Bogota')
  8. bogota_fecha = bogota.localize(fecha)
  9. print('Fecha Bogotá:', bogota_fecha)
  10.  
  11. singapur = timezone('Asia/Singapore')
  12. singapur_fecha = bogota_fecha.astimezone(singapur)
  13. print('Fecha Singapur:', singapur_fecha)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement