Grey Panther's Place
  • About
  • Blog
  • Projects
  • More
  • Archives

Converting datetime to UTC in python

So you need to convert a python datetime object which has a timezone set (“aware” in the Python nomenclature) to an UTC one with no timezone set (“naive”), for example because NDB on GAE can’t store anything else. The solution will look something like this:

date = date.astimezone(tz ...
more ...

About Grey Panther
father, husband, software craftsman

  • Social

    • linkedin
    • stackoverflow
    • github

© 2013 Grey Panther · Powered by pelican-bootstrap3, Pelican, Bootstrap

Creative Commons License Content licensed under a Creative Commons Attribution 4.0 International License, except where indicated otherwise.

Back to top