Implement time conversion routines for Unix and XT epoch formats
Some checks failed
Builds / ExectOS (amd64, debug) (push) Failing after -59m32s
Builds / ExectOS (amd64, release) (push) Failing after -59m35s
Builds / ExectOS (i686, debug) (push) Failing after -59m32s
Builds / ExectOS (i686, release) (push) Failing after -59m34s

This commit is contained in:
2026-04-24 17:48:44 +02:00
parent 341759a325
commit 3b76146d53
7 changed files with 238 additions and 0 deletions

View File

@@ -11,3 +11,15 @@
/* This is required for floating numbers to keep LLVM happy */
XTCLINK INT _fltused = 0xFEEDBULL;
/* Lookup table for days in a month, Index 0 is normal year, Index 1 is leap year */
CUSHORT RTL::Time::DaysInMonth[2][12] = {
{31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31},
{31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}
};
/* Lookup table for days preceding a month, Index 0 is normal year, Index 1 is leap year */
CUSHORT RTL::Time::DaysPrecedingMonth[2][12] = {
{0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334},
{0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335}
};