W. eWatson wrote:
<cut>
>>> now = datetime.datetime.now()
>>> fractional_hour = now.hour + now.minute / 60.0
See my post about the datetime controversy about 3-4 posts up from yours.
If timezones might be a problem area, than it might be worth while to
see it in the context of the actual application. For local, one user
only, use, the problem will be practically non-existent. Multiple users
across multiple machines will make it more difficult since you need a
verified source for each users timezone. But then again what about
travellers, wrongly set-up machines (right time wrong zone, wrong time
right zone and wrong zone with wrong time?) or people who just prefer to
do have their time set to UTC regardless of their location and season
(when I travelled alot, I just set my wristwatch, phone and laptop to UTC).
--
MPH
http://blog.dcuktec.com
'If consumed, best digested with added seasoning to own preference.'
--
http://mail.python.org/mailman/listinfo/python-list