Re: Problem with time

2007-03-23 Thread ian
"Steve Holden" <[EMAIL PROTECTED]> a écrit dans le message de news: [EMAIL PROTECTED] > import time > import datetime > > dbtd = > h, m, s = time.localtime()[3:6] > timenow = s + (60 * (m + 60 * h)) Look like ok, thanks all :) -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with time

2007-03-22 Thread Steve Holden
ian wrote: > Hi, > > i have a problem with time in python. > > 1) i got 2 values from mysql db (fields are "time" type) > 2) python get it as "" (why timedelta???) timedelta because a time doesn't represent a fixed point until it's associated with a date, I presume. > 3) i need to compare 2 fi

Re: Problem with time

2007-03-22 Thread Michael Bentley
> > 1) i got 2 values from mysql db (fields are "time" type) > 2) python get it as "" (why timedelta???) > 3) i need to compare 2 fields with actual time ... EG: > if ArrOutputsAuto[i].TimeFrom >= GNow and ArrOutputsAuto[i].TimeTo > <= GNow: > > i need actual time, and 2 fields from DB in datetim

Re: problem with "time"

2005-03-08 Thread Jeff Epler
Without your code, it's hard to tell. Here's a small program I wrote: import time t = time.time() print time.localtime(t - 86400) print time.localtime(t) on both lines, the tm_isdst flag is the same. If I choose two times that are on either side of the DST change in my timezone,