daily pastebin goal
23%
SHARE
TWEET

Untitled

a guest Jan 21st, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. time.struct_time(tm_year=2013, tm_mon=10, tm_mday=11, tm_hour=11, tm_min=57, tm_sec=12, tm_wday=4, tm_yday=284, tm_isdst=0)
  2.    
  3. '2013-10-11T11:57:12Z'
  4.    
  5. iso = time.strftime('%Y-%m-%dT%H:%M:%SZ', timetup)
  6.    
  7. >>> import time
  8. >>> timetup = time.gmtime()
  9. >>> time.strftime('%Y-%m-%dT%H:%M:%SZ', timetup)
  10. '2013-10-11T13:31:03Z'
  11.    
  12. >>> from datetime import datetime
  13. >>> datetime(*timetup[:6]).isoformat()
  14. '2013-10-11T13:31:03'
  15.    
  16. iso = time.strftime('%Y-%m-%dT%H:%M:%SZ', timetup)
  17.    
  18. iso = time.strftime('%Y-%m-%dT%H:%M:%S', timetup)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top