pytz question: GMT vs. UTC

wxjmfauth at gmail.com wxjmfauth at gmail.com
Fri Jan 31 05:17:00 EST 2014


Le vendredi 31 janvier 2014 08:02:22 UTC+1, Rustom Mody a écrit :
> On Thursday, January 30, 2014 2:15:20 PM UTC+5:30, jmf wrote:
> 
> > Le jeudi 30 janvier 2014 04:27:54 UTC+1, Chris Angelico a écrit :
> 
> > > On Thu, Jan 30, 2014 at 1:40 PM, MRAB  wrote:
> 
> > > >>         How cruel... I suspect the smack at 0degC is much more painful
> 
> > > >> than one
> 
> > > > It's the 21st century; you should be making use of Unicode: 0°C.
> 
> > > I started to read that and thought you were going to advocate the use of 0°K...
> 
> 
> 
> > ======
> 
> 
> 
> > The temperature unit is the "Kelvin", not the "Degree Kelvin".
> 
> > One writes: 0 K, 275.15 K
> 
> 
> 
> OMG! OMG!!
> 
> That is an ASCII K and not a unicode K
> 
> 
> 
> Now poor jmf will suffer the fire and brimstone of hell without
> 
> diacrïticál marks

====

I'm aware of what I did.

1) You wrote: "That is an ASCII K and not a unicode K".

This is a non sense. You are opposing ascii and unicode,
the reperoire of the ascii chars and the repertoire of the
Unicode chars.

In unicode, the are two "K"'s, one for the letter and one
for the Kelvin unit, see my previous post.

2) I used the letter "K" for commodity. Btw, I'm also
aware the 'KELVIN SIGN' is not availaible in many fonts.

3) If you wish to discuss the typographical aspect
in that story, one can discuss the kind of space which
should separate the number and the unit ('SPACE',
'SOFT HYPHEN', 'NARROW NO-BREAK SPACE',
'HAIR SPACE', ...). My "lazy" white space can also be
considered as a mistake.

4) What is definitively wrong is to claim :

"It's the 21st century; you should be making use of
Unicode: 0°C."

The 'DEGREE SIGN' and "Unicode" are two different
things. It exists in many coding schemes.


cs = ['iso-8859-1', 'iso-8859-2', 'cp437', 'cp850', 'cp1252', 'cp857',\
    'iso-8859-15']
for c in cs:
    c, '\u00b0'.encode(c, 'replace').decode(c)
    
>>> cs = ['iso-8859-1', 'iso-8859-2', 'cp437', 'cp850', 'cp1252', 'cp857',\
...     'iso-8859-15']
>>> for c in cs:
...     c, '\u00b0'.encode(c, 'replace').decode(c)
...     
('iso-8859-1', '°')
('iso-8859-2', '°')
('cp437', '°')
('cp850', '°')
('cp1252', '°')
('cp857', '°')
('iso-8859-15', '°')
>>>

5) Not unicode. The "°" is available as "direct (Shift) key"
on many European keyboards.

6) Finally and for the record : "n Kelvin" and not "n Degree Kelvin".

jmf




More information about the Python-list mailing list