Skip to content

ISOdatetime gives NA for a specific date

5 messages · Peter Dalgaard, Brian Ripley, pbarros

#
Hi all,

I am using ISOdatetime, and I just found out that when I do
ISOdatetime(1995,03,26,2,10,0) (or any other value under minutes or seconds)
I get NA

This does not happen with the same time in other dates, nor with different
hours in the same date.
Any hint why this happens?

Using R 2.8.1 under ESS/GnuEmacs under Windows XP

Pedro
#
pbarros wrote:
Daylight savings time, I guess. The clock went directly from 1:59 to
3:00 that day. Other systems behave strangely (er, "handle the anomaly")
in different ways:
[1] "1995-03-26 01:10:00 CET"
[1] "1995-03-26 01:10:00 CET"
[1] "1995-03-26 03:10:00 CEST"

(SUSE 10.2)
#
On Tue, 10 Feb 2009, pbarros wrote:

            
A non-existent time, most likely:

  x <- ISOdatetime(1995,03,26,1,10,0)
[1] "1995-03-26 01:10:00 CET"
[1] "1995-03-26 01:10:00 CET"  "1995-03-26 03:10:00 CEST"
  [3] "1995-03-26 04:10:00 CEST" "1995-03-26 05:10:00 CEST"
  [5] "1995-03-26 06:10:00 CEST" "1995-03-26 07:10:00 CEST"
  [7] "1995-03-26 08:10:00 CEST" "1995-03-26 09:10:00 CEST"
  [9] "1995-03-26 10:10:00 CEST" "1995-03-26 11:10:00 CEST"

in TZ=Europe/Lisbon, which is my guess as to near where you are

There was no 2:10 on 1995-03-26 in Lisbon: the clocks went forward an 
hour at 2 am.

  
    
#
Thanks a lot. I will need to change the time to GMT, then, I guess (this is
indeed GMT time).

Pedro

Daylight savings time, I guess. The clock went directly from 1:59 to
3:00 that day. Other systems behave strangely (er, "handle the anomaly")
in different ways:
[1] "1995-03-26 01:10:00 CET"
[1] "1995-03-26 01:10:00 CET"
[1] "1995-03-26 03:10:00 CEST"

(SUSE 10.2)



-- 
   O__  ---- Peter Dalgaard             ?ster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark      Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)              FAX: (+45) 35327907

______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
#
Thanks. Now I know how to handle it. It was killing me....

Pedro
Prof Brian Ripley wrote: