From f1b71c9fe7dbb4886588a036399cf5ebe16b7c47 Mon Sep 17 00:00:00 2001 From: Jannis Hoffmann Date: Tue, 9 Jul 2024 11:44:11 +0200 Subject: removed top level directory --- sqmail-4.3.07/src/datetime_un.c | 35 ----------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 sqmail-4.3.07/src/datetime_un.c (limited to 'sqmail-4.3.07/src/datetime_un.c') diff --git a/sqmail-4.3.07/src/datetime_un.c b/sqmail-4.3.07/src/datetime_un.c deleted file mode 100644 index e84806d..0000000 --- a/sqmail-4.3.07/src/datetime_un.c +++ /dev/null @@ -1,35 +0,0 @@ -#include "datetime.h" - -/* roughly 100x faster than mktime() */ - -datetime_sec datetime_untai(struct datetime *dt) -{ - int year; - int day; - int mon; - - year = dt->year + 1900; - - mon = dt->mon; - if (mon >= 2) { mon -= 2; } - else { mon += 10; --year; } - - day = (dt->mday - 1) * 10 + 5 + 306 * mon; - day /= 10; - - if (day == 365) { year -= 3; day = 1460; } - else { day += 365 * (year % 4); } - year /= 4; - - day += 1461 * (year % 25); - year /= 25; - - if (day == 36524) { year -= 3; day = 146096; } - else { day += 36524 * (year % 4); } - year /= 4; - - day += 146097 * (year - 5); - day += 11017; - - return ((day * 24 + dt->hour) * 60 + dt->min) * 60 + dt->sec; -} -- cgit v1.2.3