On Tue, Nov 5, 2024 at 3:07 PM Tomek CEDRO <to...@cedro.info> wrote:
>
> Yet another (probably silly) idea: how about giving choice if 32
> and/or 64 bit time is signed or unsigned in the kconfig and the
> summary warning at the end of build? This way developers could select
> what they want to use?

This could give developers complete control, if they want something
different than what we decide. But, which would be default? On 32-bit
and 64-bit archs, I suggest to use the 64 bit signed type as default.
On 8-bit and 16-bit archs, I suggest to use 32-bit unsigned as
default. Developers who want something different can choose whichever
combo they want.

The ---help--- text for 32-bit signed should contain a WARNING: Your
product will have a year 2038 problem if you choose this option!

Also, I think we had a Kconfig in the past to choose the epoch. Is
this still possible? Perhaps developers who never expect to deal with
dates before the product release (e.g., 2024) could set the epoch to
01-01-2024 and use a 32-bit type? Various functions in the OS might
have to be updated to accommodate such a Kconfig.

Cheers,
Nathan

Reply via email to