daily pastebin goal
26%
SHARE
TWEET

Untitled

a guest Jun 20th, 2018 52 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
  1. >>> from dateutil import parser
  2. >>> from dateutil.tz import tzutc, tzlocal
  3. >>>
  4. >>> s = 'Sun Oct 31 15:43:19 +0000 2010'
  5. >>>
  6. >>> d = parser.parse(s)
  7. >>> print d
  8. 2010-10-31 15:43:19+00:00
  9. >>>
  10. >>> d = d.astimezone(tzlocal())
  11. >>> print d
  12. 2010-11-01 00:43:19+09:00
  13. >>>
  14. >>> d = d.astimezone(tzutc())
  15. >>> print d
  16. 2010-10-31 15:43:19+00:00
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