[exim-dev] [Bug 2530] funny timestamp if timezone offset has…

Pàgina inicial
Delete this message
Reply to this message
Autor: admin
Data:  
A: exim-dev
Assumpte: [exim-dev] [Bug 2530] funny timestamp if timezone offset has fractions of a minute
https://bugs.exim.org/show_bug.cgi?id=2530

--- Comment #2 from Arne Wörner <arne_woerner@???> ---
yes, not many people would be happy, if TAI timestamps work...
i do not send so many emails from my box, so that it might be the best plan, to
write my own MTA, that delivers everything to the one and only allowed
recipient... :)

this would be solution #3 (it should be compliant, although it hides the
timezone of the MUA... at least it is more compliant than a offset rounded to
the nearest minute, that is lower or equal...):

> diff -u ./src/src/tod.c,orig ./src/src/tod.c

--- ./src/src/tod.c,orig    2020-02-23 22:27:38.220472512 +0000
+++ ./src/src/tod.c    2020-02-23 22:29:47.909701860 +0000
@@ -156,6 +156,9 @@
     {
     struct tm * gmt = gmtime(&now.tv_sec);


+    if (local.tm_sec != gmt->tm_sec)
+        memcpy(&local, gmt, sizeof(struct tm));
+
     diff_min = 60*(local.tm_hour - gmt->tm_hour) + local.tm_min - gmt->tm_min;
     if (local.tm_year != gmt->tm_year)
       diff_min += (local.tm_year > gmt->tm_year)? 1440 : -1440;


P. S.:
diff has the same problem... giggle

--
You are receiving this mail because:
You are on the CC list for the bug.