Re: timezones

2019-02-08 Thread Jaap van Wingerde
The blog of Paul Gansele [1] made me trying an other approach. #!/usr/bin/env python3 # -*- coding: utf_8 -*- ### tested with python3.5 from datetime import datetime, timedelta, timezone from dateutil import tz amsterdam = tz.gettz('Europe/Amsterdam') utc = tz.gettz('utc') amsterdam_datetime =

RE: timezones

2019-02-07 Thread David Raymond
I'd say if the documentation mentions it, but doesn't say why, then we're not gonna be able to do much better for you as far as "why" goes. http://pytz.sourceforge.net/ "Unfortunately using the tzinfo argument of the standard datetime constructors "does not work" with pytz for many timezones."

Re: Timezones

2014-10-07 Thread Seymore4Head
On Mon, 6 Oct 2014 13:48:58 +1100, Chris Angelico ros...@gmail.com wrote: On Mon, Oct 6, 2014 at 1:37 PM, Rustom Mody rustompm...@gmail.com wrote: My advice is to avoid time zones, they're a real pain, seriously. What say we send an application to the UN to declare the world flat? Easier to

Re: Timezones

2014-10-05 Thread Mark Lawrence
On 05/10/2014 22:17, Seymore4Head wrote: This is not a new video, but it is new to me. https://www.youtube.com/watch?v=-5wpm-gesOY Any links to some easy to follow time zone math? My advice is to avoid time zones, they're a real pain, seriously. -- My fellow Pythonistas, ask not what our

Re: Timezones

2014-10-05 Thread Akira Li
Seymore4Head Seymore4Head@Hotmail.invalid writes: This is not a new video, but it is new to me. https://www.youtube.com/watch?v=-5wpm-gesOY Any links to some easy to follow time zone math? The point of the video is that you should not do it yourself, use already written tools. It is quite

Re: Timezones

2014-10-05 Thread Rustom Mody
On Monday, October 6, 2014 3:45:44 AM UTC+5:30, Mark Lawrence wrote: On 05/10/2014 22:17, Seymore4Head wrote: This is not a new video, but it is new to me. https://www.youtube.com/watch?v=-5wpm-gesOY Any links to some easy to follow time zone math? My advice is to avoid time zones,

Re: Timezones

2014-10-05 Thread Chris Angelico
On Mon, Oct 6, 2014 at 1:37 PM, Rustom Mody rustompm...@gmail.com wrote: My advice is to avoid time zones, they're a real pain, seriously. What say we send an application to the UN to declare the world flat? Easier to simply start scheduling things in UTC. I run an international Dungeons

Re: Timezones in python

2007-12-06 Thread lukasz . f24
On 5 Dec, 13:59, Gabriel Genellina [EMAIL PROTECTED] wrote: En Wed, 05 Dec 2007 06:43:49 -0300, [EMAIL PROTECTED] escribió: Thanks guys for your answers! I know those library's but I was wondering is there something build-in for this simple convert convert. I have to do it only from +4 to

Re: Timezones in python

2007-12-05 Thread Matt Nordhoff
[EMAIL PROTECTED] wrote: Is there any build in solution in python to handle timezones? My problem is I have to convert +4 time to +0. In the worst case i can just add +4 to the houer but I'm not very happy about that. Another problem is the summer/winter timechange which happen with one week

Re: Timezones in python

2007-12-05 Thread Gabriel Genellina
En Wed, 05 Dec 2007 06:43:49 -0300, [EMAIL PROTECTED] escribió: Thanks guys for your answers! I know those library's but I was wondering is there something build-in for this simple convert convert. I have to do it only from +4 to +0. Copying the example from the tzinfo docs: from datetime

Re: Timezones in python

2007-12-05 Thread lukasz . f24
Thanks guys for your answers! I know those library's but I was wondering is there something build-in for this simple convert convert. I have to do it only from +4 to +0. -- http://mail.python.org/mailman/listinfo/python-list

Re: Timezones in python

2007-12-05 Thread Christian Heimes
[EMAIL PROTECTED] wrote: Is there any build in solution in python to handle timezones? My problem is I have to convert +4 time to +0. In the worst case i can just add +4 to the houer but I'm not very happy about that. Another problem is the summer/winter timechange which happen with one week

Re: timezones and time_t

2006-08-19 Thread Eyal Lotem
MrBlueSky wrote: Hi, I've got a Python application that (as well as lots of other stuff!) has to translate time_t values into strings in the TZ of the users choice. Looking at the Python Library Reference, I can see no platform independent way of setting the TZ that time.localtime() returns

Re: timezones and time_t

2006-08-19 Thread MrBlueSky
Thanks for the reply. Unfortunately, a simple +offset type solution isn't really accurate enough for the kind of scenario I'm looking at. I'm often dealing with different timezones with DST changeovers on different dates or even different times of day! So I need industrial-strength timezone