Re: DST or not

2009-09-05 Thread Brian Neal
On Sep 5, 4:03 pm, zweb <traderash...@gmail.com> wrote: > Is there any way to know if for a timezone , on a praticular date > time, is DST active or not? > it is required by localize command of pytz. How to find it > programatically? > > >>> est_dt = eas

DST or not

2009-09-05 Thread zweb
Is there any way to know if for a timezone , on a praticular date time, is DST active or not? it is required by localize command of pytz. How to find it programatically? >>> est_dt = eastern.localize(loc_dt, is_dst=True) >>> edt_dt = eastern.localize(lo

Re: Converting from local DST to UTC

2009-04-22 Thread Karen Tracey
On Wed, Apr 22, 2009 at 2:42 AM, vicky wrote: > > Hi, > > I am new in django. I need to update events from my website to > outlook, Google, yahoo calendars. I have implemented some code from > vObject which download ".ics" file which is OK for outlook. I don't > know how

Re: Converting from local DST to UTC

2009-04-22 Thread vicky
On Apr 15, 10:04 pm, Jamie wrote: > On Apr 14, 9:34 pm, Brian Neal wrote: > > > This is how I am doing it (I'm also integrating with Google Calendar): > > > tz = pytz.timezone(tz_name)  # create timezone > > local = tz.localize(d)  # make naive datetime

Re: Converting from local DST to UTC

2009-04-15 Thread Jamie
On Apr 14, 9:34 pm, Brian Neal wrote: > This is how I am doing it (I'm also integrating with Google Calendar): > tz = pytz.timezone(tz_name)  # create timezone > local = tz.localize(d)  # make naive datetime localized > zulu = local.astimezone(FixedOffset(0))  # convert to UTC

Re: Converting from local DST to UTC

2009-04-14 Thread Brian Neal
me stored by Django and adding the > local timezone pulled from settings.py then using astimezone(pytz.utc) > to make the conversion to UTC. I'm not sure how to adjust for DST, > especially since all the events will be in the future and DST will > have to be calculated for each of them.

Converting from local DST to UTC

2009-04-14 Thread Jamie
l timezone pulled from settings.py then using astimezone(pytz.utc) to make the conversion to UTC. I'm not sure how to adjust for DST, especially since all the events will be in the future and DST will have to be calculated for each of them. --~--~-~--~~~---~--~~ Yo

Re: Django effects Python time/datetime and gives wrong time after DST update

2007-03-12 Thread Malcolm Tredinnick
On Mon, 2007-03-12 at 11:53 -0300, Ramiro Morales wrote: > On 3/12/07, DavidA <[EMAIL PROTECTED]> wrote: > > > > I found a workaround but I'm not sure what the ramifications are. I > > commented out this line in django.conf.__init__.py: > > > > os.environ['TZ'] = self.TIME_ZONE > > > > What

Re: Django effects Python time/datetime and gives wrong time after DST update

2007-03-12 Thread DavidA
Thanks. I am on trunk, 4227 so I don't have this fix. On Mar 12, 10:53 am, "Ramiro Morales" <[EMAIL PROTECTED]> wrote: > On 3/12/07, DavidA <[EMAIL PROTECTED]> wrote: > > > > > I found a workaround but I'm not sure what the ramifications are. I > > commented out this line in

Re: Django effects Python time/datetime and gives wrong time after DST update

2007-03-12 Thread Ramiro Morales
On 3/12/07, DavidA <[EMAIL PROTECTED]> wrote: > > I found a workaround but I'm not sure what the ramifications are. I > commented out this line in django.conf.__init__.py: > > os.environ['TZ'] = self.TIME_ZONE > What version/revision of Django are you using?. See ticket #2315 and changeset

Re: Django effects Python time/datetime and gives wrong time after DST update

2007-03-12 Thread DavidA
s. They have > been running an hour late today after all the DST changes (here in the > US). I've traced it down to any call to Django is shifting my time > back an hour (like it was before this weekend's shift). > > So the time as reported by time.time() and datetime.datetime

Django effects Python time/datetime and gives wrong time after DST update

2007-03-12 Thread DavidA
I have some scripts that run tasks and use Django DB models. They have been running an hour late today after all the DST changes (here in the US). I've traced it down to any call to Django is shifting my time back an hour (like it was before this weekend's shift). So the time as reported