Christian Heimes wrote:
From the README.txt
pytz brings the Olson tz database into Python. This library allows
accurate and cross platform timezone calculations using Python 2.3
or higher. It also solves the issue of ambiguous times at the end
of daylight savings, which you can read more about
Phillip J. Eby [EMAIL PROTECTED] wrote:
At 09:20 PM 3/9/2007 +, Jon Ribbens wrote:
If you want the answer to be the entire of that day then you need
to alter the datetime module so that, e.g. subtracting 2007-03-08
from 2007-03-09 does not return one day as currently, but returns
zero
On 03/09/2007 08:56 PM, Martin v. Löwis wrote:
--
Sjoerd Mullender
Christian Heimes schrieb:
BJörn Lindqvist schrieb:
I think it should be a ValueError, given that the programmer is very
likely to further use the returned timestamp to for example insert
stuff in a database. Unix timestamps
Steven Bethard [EMAIL PROTECTED] wrote:
Using the .date() is fine when the year/month/day doesn't match. So
the following are fine::
datetime.datetime(2005, 1, 1, 0, 0, 0) datetime.date(2006, 1, 1)
datetime.datetime(2007, 1, 1, 0, 0, 0) datetime.date(2006, 1, 1)
It's *not* okay to
Hello all,
I realise that this may be more relevant to Python ideas, in which case
feel free to ignore this (and my apologies).
I occasionally see code looking (something) like :
calling_scope = sys._getframe(1).f_globals['__name__']
This looks and smells like a hack (not least because of
Jon Ribbens schrieb:
So you're deciding that a 'date' is 'the entire of that day', except
when you subtract two of them, when it suddenly means something else? ;-)
It makes kinda sense although it looks like a contradiction at first.
The common linguistic usage of dates in English and German:
Christian Heimes [EMAIL PROTECTED] wrote:
Jon Ribbens schrieb:
So you're deciding that a 'date' is 'the entire of that day', except
when you subtract two of them, when it suddenly means something else? ;-)
It makes kinda sense although it looks like a contradiction at first.
The common
On Fri, Mar 09, 2007 at 10:10:48PM -0800, Neal Norwitz wrote:
We should probably be a lot more aggressive about closing bugs and
patches without response. Unfortunately many fall into this category.
This question comes up every so often, and after much discussion I
think python-dev always
Jon Ribbens schrieb:
What do you feel next Tuesday plus 12 hours means? ;-)
First thought: It's nonsense! Nobody would say that. ;)
Second though: Tuesday noon (12h after the beginning of Tuesday)
Christian
___
Python-Dev mailing list
Martin v. Löwis wrote:
Michael Foord schrieb:
Hello all,
I realise that this may be more relevant to Python ideas, in which
case feel free to ignore this (and my apologies).
I occasionally see code looking (something) like :
calling_scope = sys._getframe(1).f_globals['__name__']
This
Christian Heimes [EMAIL PROTECTED] wrote:
What do you feel next Tuesday plus 12 hours means? ;-)
First thought: It's nonsense! Nobody would say that. ;)
Second though: Tuesday noon (12h after the beginning of Tuesday)
I agree with you entirely. Your suggestions correspond to 'throw an
On 3/9/07, Christian Heimes [EMAIL PROTECTED] wrote:
Collin Winter schrieb:
I can't say I'm well-versed in the intricacies of date/time issues,
but what you say makes sense. This is exactly why I brought this patch
up here : )
Oh h...! Seems like I've opened a can of worms here. I only
In my continuing trawl through the SF patch tracker, I came across
#1244929 (http://python.org/sf/1244929), which causes
TestLoader.loadTestsFromModule() to skip classes whose name starts
with an underscore. This addresses the warning in that method's docs:
While using a hierarchy of
On Sat, 10 Mar 2007 09:13:28 -0600, Collin Winter [EMAIL PROTECTED] wrote:
In my continuing trawl through the SF patch tracker, I came across
#1244929 (http://python.org/sf/1244929), which causes
TestLoader.loadTestsFromModule() to skip classes whose name starts
with an underscore. This addresses
On 3/9/07, Collin Winter [EMAIL PROTECTED] wrote:
On the subject of datetime enhancements, I came
across an SF patch (#1673403) the other day that
proposed making it possible to compare date and
datetime objects.
One solution that just occurred to me -- and that
skirts the issue of
Robert Brewer [EMAIL PROTECTED] wrote:
One solution that just occurred to me -- and that
skirts the issue of choosing an interpretation --
is that, when comparing date and datetime objects,
the datetime's .date() method is called and the
result of that call is compared to
Looks like you misunderstand what's going on. sys._getframe()
*intentionally* smells like a hack, becase we don't *want* you to feel
comfortable using it. Its mere existence may constrain other Python
implementations from optimizing the code they generate; it is a
compromise to enable those
On 3/10/07, Jon Ribbens [EMAIL PROTECTED] wrote:
Steven Bethard [EMAIL PROTECTED] wrote:
Using the .date() is fine when the year/month/day doesn't match. So
the following are fine::
datetime.datetime(2005, 1, 1, 0, 0, 0) datetime.date(2006, 1, 1)
datetime.datetime(2007, 1, 1, 0,
Steven Bethard [EMAIL PROTECTED] wrote:
I don't see why the docs can't be explicit about what subtraction
means given that there are a number of possible interpretations.
I don't see why the docs can't be explicit about what comparison
means given that there are a number of possible
On 3/10/07, A.M. Kuchling [EMAIL PROTECTED] wrote:
On Fri, Mar 09, 2007 at 10:10:48PM -0800, Neal Norwitz wrote:
We should probably be a lot more aggressive about closing bugs and
patches without response. Unfortunately many fall into this category.
This question comes up every so often,
Hi all,
Is there any need for Python/fmod.c any more? I can't see how
it can be included because there's no test for fmod in the
./configure script and grepping all files in the tree for fmod.c
finds nothing except a commented out line in PC/os2vacpp/makefile.omk
If it is needed, it needs fixing
On 3/10/07, Robert Brewer [EMAIL PROTECTED] wrote:
On 3/9/07, Collin Winter [EMAIL PROTECTED] wrote:
On the subject of datetime enhancements, I came
across an SF patch (#1673403) the other day that
proposed making it possible to compare date and
datetime objects.
One
On 3/10/07, Jon Ribbens [EMAIL PROTECTED] wrote:
Steven Bethard [EMAIL PROTECTED] wrote:
I still don't see why my more careful comparison would be bad for any
of your code. Could you give an example where it would be bad for all
the following to be False::
date(2006, 1, 1)
On 3/10/07, Collin Winter [EMAIL PROTECTED] wrote:
On 3/9/07, Christian Heimes [EMAIL PROTECTED] wrote:
Collin Winter schrieb:
I can't say I'm well-versed in the intricacies of date/time issues,
but what you say makes sense. This is exactly why I brought this patch
up here : )
Oh
On 3/10/07, Jean-Paul Calderone [EMAIL PROTECTED] wrote:
On Sat, 10 Mar 2007 09:13:28 -0600, Collin Winter [EMAIL PROTECTED] wrote:
In my continuing trawl through the SF patch tracker, I came across
#1244929 (http://python.org/sf/1244929), which causes
TestLoader.loadTestsFromModule() to skip
Jon Ribbens wrote:
So you're deciding that a 'date' is 'the entire of that day', except
when you subtract two of them, when it suddenly means something else? ;-)
No, you're considering dates to be discrete entities,
like integers. You wouldn't use the same reasoning to
argue that the
* Christian Heimes [EMAIL PROTECTED] [2007-03-10 03:58:27 +0100]:
From the README.txt
pytz brings the Olson tz database into Python. This library allows
accurate and cross platform timezone calculations using Python 2.3
or higher. It also solves the issue of ambiguous times at the end
of
Tristan Seligmann schrieb:
pytz.timezone('Africa/Johannesburg')
DstTzInfo 'Africa/Johannesburg' SAST+1:30:00 STD
# SAST is UTC+2 not UTC+1.5
pytz.timezone('Etc/GMT+2')._utcoffset
datetime.timedelta(-1, 79200)
# I thought I asked for GMT+2, not GMT-2
Tristan Seligmann wrote:
Unfortunately, it would appear that the Olson tz database contains some
rather... uh... confusing data. For example:
pytz.timezone('Africa/Johannesburg')
DstTzInfo 'Africa/Johannesburg' SAST+1:30:00 STD
# SAST is UTC+2 not UTC+1.5
The tz of Africa/Johannesburg
I see you snipped without response my request to back up your claim
that assuming that a date() is a datetime() with a time of midnight
will clearly break that logic.
Am I to assume you cannot back it up?
___
Python-Dev mailing list
Jon Ribbens wrote:
What do you feel next Tuesday plus 12 hours means? ;-)
I would say it's meaningless. My feeling is that subtracting
two dates should give an integer number of days, and that is
all you should be allowed to add to a date.
--
Greg
31 matches
Mail list logo