> Whether or not it's positive or negative depends on which side of
GMT/UTC
> you are, of course :) Note that the result in is seconds, too:
Which is insane since timezones have nothing to do with time offsets.
Especially at the second level!
Oh well, nothing is perfect!
Alan G.
(Feeling picky
On Jan 26, 2005, at 02:56, Luis N wrote:
In other words I have to do some arithmetic:
import time
time.timezone
0
The server is located in Dallas, Texas.
Which means it's not properly configured. On UNIX systems, to
configure the timezone, you must adjust /etc/localtime so that it's a
symlink th
On Jan 26, 2005, at 02:44, Tony Meyer wrote:
time.timezone gives you, I think, the offset between
your current timezone and GMT. However, being myself in the GMT zone,
I don't know exactly if the returned offset is positive or negative
(it returns 0 here, which makes sense :D ).
Whether or not it's
In other words I have to do some arithmetic:
>>> import time
>>> time.timezone
0
The server is located in Dallas, Texas.
On Wed, 26 Jan 2005 15:44:48 +1300, Tony Meyer <[EMAIL PROTECTED]> wrote:
> > time.timezone gives you, I think, the offset between
> > your current timezone and GMT. However,
> time.timezone gives you, I think, the offset between
> your current timezone and GMT. However, being myself in the GMT zone,
> I don't know exactly if the returned offset is positive or negative
> (it returns 0 here, which makes sense :D ).
Whether or not it's positive or negative depends on wh
On Jan 26, 2005, at 00:50, Luis N wrote:
Ok, urllib.quote worked just fine, and of course so did
urllib.pathname2url.
I should have run a dir() on urllib. Those functions don't appear in
http://docs.python.org/lib/module-urllib.html
Now, how might one go about calculating the New York time off-se
Ok, urllib.quote worked just fine, and of course so did urllib.pathname2url.
I should have run a dir() on urllib. Those functions don't appear in
http://docs.python.org/lib/module-urllib.html
Now, how might one go about calculating the New York time off-set from
GMT? The server is in the U.S. but
Kent Johnson wrote:
>>> import re
>>> def hexify(match):
... return '%%%X' % ord(match.group(0))
Ah, should be '%%%02X' ...
Kent
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Luis N wrote:
How would I best turn this string:
'2005-01-24 00:00:00.0'
into this string:
'2005%2D01%2D24%2000%3A00%3A00%2E0'
In order to call a URL.
urllib.quote_plus() is intended for this purpose though it doesn't have the
result you ask for:
>>> import urllib
>>> s='2005-01-24 00:00:00.0'
I got this from spyce
http://spyce.sourceforge.net
_url_ch = re.compile(r'[^A-Za-z0-9_.!~*()-]') # RFC 2396 section 2.3
def url_encode(o, **kwargs):
'''Return URL-encoded string.'''
return _url_ch.sub(lambda match: "%%%02X" % ord(match.group(0)),
str(o))
It was just the first thing I found in
On Jan 24, 2005, at 23:29, Luis N wrote:
How would I best turn this string:
'2005-01-24 00:00:00.0'
into this string:
'2005%2D01%2D24%2000%3A00%3A00%2E0'
In order to call a URL.
I've hunted through the standard library, but nothing seemed to jump
out.
The pathname2url in urllib seems to do wha
11 matches
Mail list logo