[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: os.time question
- From: roberto@... (Roberto Ierusalimschy)
- Date: Tue, 9 Jan 2007 18:09:39 -0200
> I took a quick look at the os_time function in loslib.c, and the default
> value for hour is 12 (noon) instead of 0 (midnight). If you want it to
> be midnight, add "hour=0" to the table that you pass to os.time.
>
> To Roberto or Luiz: Is this a bug, or is it intentional?
It was intentional. It is even documented in PiL (pg. 202, 2nd edition)
(although not in the manual). I never realized that 'date' has a different
default. (Noon seems to be more "inside" a given date than midnight...)
-- Roberto