"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
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
>
> 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
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,