avr-libc-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-libc-dev] [bug #46303] eu_dst() in include/util/eu_dst.h returns wr


From: Fred
Subject: [avr-libc-dev] [bug #46303] eu_dst() in include/util/eu_dst.h returns wrong DST info (avr-libc 1.8.1)
Date: Tue, 27 Oct 2015 20:10:22 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36

Follow-up Comment #1, bug #46303 (project avr-libc):

I think the bug is not fixed. eu_dst() tells me that DST does not apply on
2015-10-24 01:00:00 UTC. But it should.

>From eu_dst() :

    /* determine mday of last Sunday */
    n = tmptr.tm_mday - 1;
    n -= day_of_week;
    n += 7;
    d = n % 7;  /* date of first Sunday */

    n = 31 - d;
    n /= 7; /* number of Sundays left in the month */

    d = d + 7 * n;  /* mday of final Sunday */

If we try with tmptr.tm_mday == 25 and day_of_week == 0 (for October 25th,
which is the last Sunday of October in 2015), then we get d == 31. Which is
actually the last Saturday of October.

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?46303>

_______________________________________________
  Message posté via/par Savannah
  http://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]