On Fri, Aug 01, 2025 at 11:36:34AM +0200, Denys Vlasenko wrote:
> On Thu, Jul 31, 2025 at 10:08 PM Ladislav Michl <[email protected]> wrote:
> > Hi Denys,
> >
> > On Wed, Jul 30, 2025 at 07:46:46PM +0200, Denys Vlasenko wrote:
> > > Applied, thank you.
> > > Apologies for a big delay.
> >
> > unfortunately something want wrong here. I sent and was pinging on v2 of
> > this patch. Can you revert and apply correct one or shall I send fixup?
>
> You mean, you want a version which does print the date even if date
> setting failed?
>
> Yes, I see that this is what date from coreutils 9.1 does,
> but is it in any way important? It's not required by
> https://pubs.opengroup.org/onlinepubs/9699919799/utilities/date.html
> and if your script needs date to be set, then on error, what's important
> is that there was an _error_, not which specific date was attempted to be set.
>
> IOW: here the user very much interested in date output:
>
> YYYYMMDD=`date -I`
>
> Here, not so much:
>
> date -s $NEWDATE || exit $?
>
> Am I mistaken? Did you see real-world use where people needed to see the date
> after a failure to set it?
No, I did the change solely for scripting purposes. I provided the second
version of the patch just for a sake of compatibility with coreutils.
> The code *can* be changed to "print error, continue till the end,
> return error indicator" logic, but is it worth the code increase?
Okay, I do agree with your rationale. After all, change is still archived,
so it can be easily restored if (ever) needed.
Thanks,
ladis
_______________________________________________
busybox mailing list
[email protected]
https://lists.busybox.net/mailman/listinfo/busybox