Marcus Kriele
2012-Aug-01  19:45 UTC
[R] timeBasedSeq stumbles over the year 2038 (xts package)
I have the following problem: As expected I obtain timeBasedSeq( 2037/2037) [1] "2037-01-01">However if I do the same for 2038 I get timeBasedSeq( 2038/2038) [1] "2038-01-01" "2039-01-01" I get the same strange result if I use later years or any interval that contains 2038: timeBasedSeq( 2037/2039) [1] "2037-01-01" "2038-01-01" "2039-01-01" "2040-01-01">Am I doing anything wrong? I am using R2.15.1 und xts 0.8.6 on a mac. Many thanks, Marcus [[alternative HTML version deleted]]
Jeff Newmiller
2012-Aug-01  23:10 UTC
[R] timeBasedSeq stumbles over the year 2038 (xts package)
http://en.wikipedia.org/wiki/Year_2038_problem
Workaround 1: Avoid collecting data in the future and processing it in the
present.
Workaround 2: Use a 64-bit build of R, as appropriate for such future data sets.
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live
Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
--------------------------------------------------------------------------- 
Sent from my phone. Please excuse my brevity.
Marcus Kriele <mkriele at mac.com> wrote:
>I have the following problem:
>
>As expected I obtain
> timeBasedSeq( 2037/2037)
>[1] "2037-01-01"
>> 
>However if I do the same for 2038 I get
>timeBasedSeq( 2038/2038)
>[1] "2038-01-01" "2039-01-01"
>
>I get the same strange result if I use later years or any interval that
>contains 2038:
>timeBasedSeq( 2037/2039)
>[1] "2037-01-01" "2038-01-01" "2039-01-01"
"2040-01-01"
>> 
>
>Am I doing anything wrong?  I am using R2.15.1 und xts 0.8.6 on a mac. 
>
>Many thanks,  Marcus
>
>
>	[[alternative HTML version deleted]]
>
>______________________________________________
>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.