Thursday, May 28, 2015

Re: Why the extra minute in PostgreSQL when using time zone info?

this is not an extra minute, it is a representation of the timezone offset

On Thu, May 28, 2015 at 11:42 PM, Daniel Grace <danwgrace@gmail.com> wrote:
I used this function, seemed to tidy up the problem:

from datetime import datetime
from pytz import timezone

    def utcDtTm(self, dt_tm):
        tz = timezone('Europe/London')
        return tz.normalize(tz.localize(dt_tm)).astimezone(timezone('UTC'))

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/12a0ab90-8108-46b4-8e90-5aadedbb3d2c%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAFWa6tJp2CLSSqzkiOMyGysGzxk%3DyhP2OD23toS1FOb43%3D%3D3Dg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment