[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: os.time() modifies the argument
- From: Jonathan Goble <jcgoble3@...>
- Date: Sat, 28 Jan 2017 01:10:08 -0500
On Sat, Jan 28, 2017 at 12:33 AM, Dirk Laurie <email@example.com> wrote:
> Now that it is out in the open, we should choose: do we want it removed
> or do we want it documented? I rather like it.
I don't. Note that in Nicola's example, which I have verified on my
own machine, the `isdst` field was forcibly overridden: it was
explicitly set to false, but the call to os.time ignored that and
changed it to true anyway. This is most definitely unwanted behavior.
If a user sets a field to a particular value, it should be respected
and not ignored, and most certainly NOT overwritten without notice.
If we do keep this behavior, it needs to be modified to never alter a
field already present, only filling in nil fields instead.