I have adjusted grub functions to extend the range, I'll send then later today
Le sam. 17 août 2024, 17:20, Andrew Hamilton <adham...@gmail.com> a écrit : > Thank you, I see now there are some functions I may be able to use > already in the GRUB gnulib, I will investigate that. > > Thank you for the quick feedback! > > - Andrew > > On Sat, Aug 17, 2024 at 9:03 AM Vladimir 'phcoder' Serbinenko > <phco...@gmail.com> wrote: > > > > No, it's license-incompatible. Please don't use that code. > > > > Le sam. 17 août 2024, 16:44, Andrew Hamilton <adham...@gmail.com> a > écrit : > >> > >> Hello, > >> > >> I'm thinking to try to address bug 63894 (grub_datetime2unixtime() > >> still has the year 2038 problem): > >> https://savannah.gnu.org/bugs/?63894 > >> > >> I confirmed the issue is still partially present in > >> include/grub/datetime.h... the following checks are still present and > >> the issue mentioned local variable limitations are also still an > >> issue: > >> > >> grub_datetime2unixtime (const struct grub_datetime *datetime, > grub_int64_t *nix) > >> { > >> grub_int32_t ret; > >> ... > >> if (datetime->year > 2038 || datetime->year < 1901) > >> return 0; > >> ... > >> > >> Simply changing the locals to 64-bit and removing the 2038 limit does > >> not completely solve the issue, at some point past 2038 the result of > >> this algorithm produces incorrect results. > >> > >> To completely solve the issue, I wanted to use the algorithm > >> implemented by the Linux kernel in mktime64 (time.c around line 449): > >> > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/kernel/time/time.c?h=v6.11-rc3 > >> > >> Would it be acceptable to base the GRUB implementation on the Linux > >> Kernel algorithm above? > >> > >> Thanks, > >> Andrew > >> > >> _______________________________________________ > >> Grub-devel mailing list > >> Grub-devel@gnu.org > >> https://lists.gnu.org/mailman/listinfo/grub-devel > > > > _______________________________________________ > > Grub-devel mailing list > > Grub-devel@gnu.org > > https://lists.gnu.org/mailman/listinfo/grub-devel > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel >
_______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel