From: Andrew Hamilton <adhamilt@gmail.com>
To: grub-devel@gnu.org
Cc: daniel.kiper@oracle.com, masayuki.moriyama@miraclelinux.com,
andrea.biardi@viavisolutions.com, phcoder@gmail.com,
Andrew Hamilton <adhamilt@gmail.com>
Subject: [PATCH v6 0/2] Support dates outside of 1901..2038 range
Date: Wed, 27 Aug 2025 17:32:12 -0500 [thread overview]
Message-ID: <20250827223214.31474-1-adhamilt@gmail.com> (raw)
Support dates outside of 1901..2038.
Add tests for dates outside this range.
Vast majority of the work was done by Vladimir Serbinenko
Fixes: https://savannah.gnu.org/bugs/?63894
Fixes: https://savannah.gnu.org/bugs/?66301
V5 -> V6:
datetime.c:
Move comment line "There are three 100-year periods worth of leap
days (3*24)" down one line.
Change order of terms in 'days' calculation to be more readable.
date_unit_test.c:
Correct comment to "Leap year, after Feb" instead of "prior to Feb"
Add "reviewed by" from Daniel Kiper for patches with permission.
V4 -> V5:
datetime.c / h:
Rename variables "is_bisextile" to "bisextile".
Change some boolean assignments to use ternary operator.
Compare booleans to true instead of checking "if(boolean)".
date_unit_test.c:
Add additional commentary to the tests array for meaning of numbers.
Rework test ranges to cover from years 0001 to 9999 and add specific
min/max tests for min 0001 date and max 9999 date.
V3 -> V4: Add additional commentary for a few magic numbers
and fix some coding standard issues.
V2 -> V3: Added additional commentary to datetime.c to describe
the origin of some of the numbers used in calculations.
Andrew Hamilton (2):
datetime: Support dates outside of 1901..2038 range
date_unit_test: test dates outside of 32-bit unix range
grub-core/lib/datetime.c | 65 +++++++++++++++++++++++++++-------
include/grub/datetime.h | 28 ++++++++++-----
tests/date_unit_test.c | 75 +++++++++++++++++++++++++++++++++++-----
3 files changed, 139 insertions(+), 29 deletions(-)
--
2.39.5
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
next reply other threads:[~2025-08-27 22:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-27 22:32 Andrew Hamilton [this message]
2025-08-27 22:32 ` [PATCH v6 1/2] datetime: Support dates outside of 1901..2038 range Andrew Hamilton
2025-08-27 22:32 ` [PATCH v6 2/2] date_unit_test: test dates outside of 32-bit unix range Andrew Hamilton
2025-08-28 14:01 ` [PATCH v6 0/2] Support dates outside of 1901..2038 range Daniel Kiper via Grub-devel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250827223214.31474-1-adhamilt@gmail.com \
--to=adhamilt@gmail.com \
--cc=andrea.biardi@viavisolutions.com \
--cc=daniel.kiper@oracle.com \
--cc=grub-devel@gnu.org \
--cc=masayuki.moriyama@miraclelinux.com \
--cc=phcoder@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).