Time problem (again)

Fabio Durieux Lopes durieux_br at yahoo.com.br
Thu Mar 27 15:17:21 EDT 2008


   Hi,

   I'm recreating a date-time based on a string and I have a problem 
when daylight savings time is set (I'm off by 1). So today I forced 
my computer into daylight savings time and debugged it again, but 
this time I noticed something strange.

   This is the documentation from python library reference section 
6.10:

6.10 time -- Time access and conversions
...
daylight 
Nonzero if a DST timezone is defined.
...


And this is what I debugged:
-> fileTimeInSecs = time.mktime(time.strptime(timeString, 
"%Y%m%d%H%M"))
(Pdb) p timeString
'200803271643'
(Pdb) n
> /home/salsa/Projects/TimBR_CDR/fileSync/
fileSynchronizer.py(50)passFilesOlderThan()
-> print time.daylight
(Pdb) 
0

 See how 'print time.daylight' resulted in '0'? Shouldn't it be Non-
zero? Do I have to set something for it to use DST?


 Also, is this the right list to send questions?
 
 








More information about the Python-list mailing list