Re: Python 2.6 and timezones

2011-05-23 Thread Miki Tebeka
> [1] http://pypi.python.org/pypi/PosixTimeZone/0.9.4 > [2] http://pypi.python.org/pypi/pytz/2011g > [3] http://docs.python.org/library/datetime.html#tzinfo-objects Also http://labix.org/python-dateutil#head-587bd3efc48f897f55c179abc520a34330ee0a62 HTH -- Miki Tebeka http://pythonwise.blogspot.c

Re: Python 2.6 and timezones

2011-05-23 Thread Daniel Kluev
On Mon, May 23, 2011 at 10:56 PM, loial wrote: > Thanks...but being a python newbie I am struggling to understand how > to do this. > > How can I use tzinfo to do the equivalent of what I do in Java, which > is : > >TimeZone tz1 = TimeZone.getDefault(); > >long localOffset = tz1.getOffset

Re: Python 2.6 and timezones

2011-05-23 Thread loial
Thanks...but being a python newbie I am struggling to understand how to do this. How can I use tzinfo to do the equivalent of what I do in Java, which is : TimeZone tz1 = TimeZone.getDefault(); long localOffset = tz1.getOffset(date.getTime()); TimeZone tz2 = TimeZone.getTimeZone("E

Re: Python 2.6 and timezones

2011-05-23 Thread Daniel Kluev
On Mon, May 23, 2011 at 9:32 PM, loial wrote: > Does python have an equivalent of the java Timezone object? > > I need to be able to get offsets for timezones (only U.S. time zones > at the moment) Depends on what exactly do you want. If you need to convert timezone name into current offset, you