lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> 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