From th|erry@onke||nx @end|ng |rom |nbo@be  Wed Aug 21 09:53:54 2019
From: th|erry@onke||nx @end|ng |rom |nbo@be (Thierry Onkelinx)
Date: Wed, 21 Aug 2019 09:53:54 +0200
Subject: [Rd] Fwd: Bug Reporting
In-Reply-To: <CAP=5aRKvy_KFy4x9fYxE8txuvnogfcB82owjLWvJ_OSfCXdLgQ@mail.gmail.com>
References: <CAP=5aR+fHcMvqrErOw6miysJ6SMXYwP=DHzsX=yN94kFU0Q7oA@mail.gmail.com>
 <CAP=5aR+K9naCHtdmYOhR1AsAL9iL2bcCzHWDo-NPgH5mrh6MpQ@mail.gmail.com>
 <CAP=5aRKvy_KFy4x9fYxE8txuvnogfcB82owjLWvJ_OSfCXdLgQ@mail.gmail.com>
Message-ID: <CAJuCY5xAxcPeb1HJY5-QCo4ZT-1fUrkx8eXnqwR1iap7TeOVXg@mail.gmail.com>

Dear Tommaso,

This is not a bug. You asked for a difference of 1 day = 24 hours = 1440
minutes = 86400 seconds. And that is the difference you get.

> start <- as.POSIXct(strptime("20151025",format='%Y%m%d'))
> end <- start + as.difftime(1, unit="days")
> end - start
Time difference of 1 days
> as.integer(end) - as.integer(start)
[1] 86400

Best regards,

ir. Thierry Onkelinx
Statisticus / Statistician

Vlaamse Overheid / Government of Flanders
INSTITUUT VOOR NATUUR- EN BOSONDERZOEK / RESEARCH INSTITUTE FOR NATURE AND
FOREST
Team Biometrie & Kwaliteitszorg / Team Biometrics & Quality Assurance
thierry.onkelinx at inbo.be
Havenlaan 88 bus 73, 1000 Brussel
www.inbo.be

///////////////////////////////////////////////////////////////////////////////////////////
To call in the statistician after the experiment is done may be no more
than asking him to perform a post-mortem examination: he may be able to say
what the experiment died of. ~ Sir Ronald Aylmer Fisher
The plural of anecdote is not data. ~ Roger Brinner
The combination of some data and an aching desire for an answer does not
ensure that a reasonable answer can be extracted from a given body of data.
~ John Tukey
///////////////////////////////////////////////////////////////////////////////////////////

<https://www.inbo.be>


Op wo 21 aug. 2019 om 08:25 schreef TOMMASO ADAMI <t.adami at studenti.unibg.it
>:

> Hello,
>
>   I would like to report this date/time bug that threatened me for a long
> time,
>    as I need correct date calculation in my computations.
>
> If I add 1 day to the light saving switching day, it will incorrectly
> subtract 1 hour from the date and missalign all my calculations.
>
> You can see it runing (I am testing it with Rome, Italy (+1) TimeZone)
>
> print(paste0("Horrible R Bug is present?
> ",strptime("20151025",format='%Y%m%d')+as.difftime(1, unit="days")));
>
> As you can see the output says 11pm and not 12pm !
>
> I do not know if it is a requested feature, but for me is unpleasant and
> unexpected behaviour.
>
> Thank you very much!
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

	[[alternative HTML version deleted]]



[Rd] Fwd: Bug Reporting
Thierry Onkelinx