search for: isodatetime

Displaying 20 results from an estimated 69 matches for "isodatetime".

2005 Oct 25
2
strptime problem for 2004-10-03 02:00:00
...Windows and Linux and only for 2004 (AFAIK) I report it. I have a problem with as.POSIXct for the hour between "2004-10-03 02:00:00 GMT" and "2004-10-03 02:59:59 GMT". In short, the 2 AM (GMT) hour in 2004 (but not in other years) is interpreted as 1 AM by strptime: (I use ISOdatetime as a convenience). ## Windows XP ISOdatetime(2004, 10, 3, 2, 0, 0, tz = "GMT") ##[1] "2004-10-03 01:00:00 GMT" ISOdatetime(2004, 10, 3, 1, 0, 0, tz = "GMT") ##[1] "2004-10-03 01:00:00 GMT" ISOdatetime(2005, 10, 3, 2, 0, 0, tz = "GMT") ##[1] &...
2009 Feb 10
3
ISOdatetime gives NA for a specific date
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 X...
2008 Jan 10
2
how to calculate time offset between timezones?
...there a way to calculate the offset between timezones, e.g. from "AST" to "GMT"? #DETAILS# I am working with data files that use local time, and that indicate the timezone by e.g. "AST" (Atlantic Standard Time, my local time) in a header. I was guessing that > ISOdatetime(2008,1,1,1,0,0,tz="GMT") - > ISOdatetime(2008,1,1,1,0,0,tz="AST") would work, but it gives a difference of 0. However, when I do > ISOdatetime(2008,1,1,1,0,0,tz="GMT") - ISOdatetime(2008,1,1,1,0,0) I get a -4h offset, which is correct. The odd thing is, I am...
2009 Feb 10
2
Strange behaviour of ISOdatetime
Hi All, I am watching a strange behaviour of ISOdatetime. In my work computer, I get NA when I try to do > ISOdatetime(1995,03,26,2,0,0) [1] NA But on other dates and/or times (hour) works OK > ISOdatetime(1995,03,25,2,0,0) [1] "1995-03-25 02:00:00 GMT" In my home computer, I do not have this problem. I am running the same version of...
2009 Jan 19
1
maptools, sunriset, POSIX timezones
Hi ... I wonder if anyone can provide some insight into why the first three examples using the sunriset function (appended below, with results) give the correct answer, but the fourth generates and error. The first two use ISOdatetime with and without a time zone attribute, and the sunriset function returns the correct sunset time. The third and fourth adds 10 seconds to the ISOdatetime (with and without the time zone attribute) but the function only works when the time zone is specified (example 3). When I look at the obje...
2012 Jan 20
2
Incorrect DateTime using ISOdatetime in R
Dear list, I need to transform the DateTime of my GPS data from: "666.1751" into "yyyy/mm/dd hh:mm:ss" I have the following code: d$Date <- ISOdatetime(2009, 1, 1, 0, 0, 0, tz = "GMT")+d$Date*(24*3600) This gives me: 2010-10-29 04:12:09, which is wrong. It should be 2010-10-29 06:12:09 Another example: 418.3219 corresponds to: 2010-02-23 07:43:30, but it should be 2010-02-23 08:43:30. However, not always is the difference + 2 h, it...
2011 Dec 14
1
A Question Re ISOdatetime
Dear all, I am using the ISOdatetime function like this: test.info$TradeTime = with(test.info, mapply(FUN = ISOdatetime, Year, Month, Day, Hour, Minute, 60, "EST")) Where Year, Month etc are all numeric. I think ISOdatetime should return a POSIXct object. However, the result I obtained from the line above is all numeric....
2004 Apr 29
1
Entering times around the start of daylight savings time
I'm having problems entering dates and times around when daylight savings time starts. If I type (on R 1.8.1 on Gentoo Linux) > ISOdatetime(2004,4,4,0:4,0,0,"GMT") [1] "2004-04-03 19:00:00 EST" "2004-04-03 20:00:00 EST" [3] "2004-04-03 22:00:00 EST" "2004-04-03 22:00:00 EST" [5] "2004-04-03 23:00:00 EST" Giving the times between 2:00 and 3:00 GMT on 4 April which are all off...
2005 Aug 27
2
zoo, zooreg, & ISOdatetime
I create a zooreg object that runs from Jan-1-2002 0:00 to Jun-1-2005 0:00... regts.start = ISOdatetime(2002, 1, 1, hour=0, min=0, sec=0, tz="") regts.end = ISOdatetime(2005, 6, 1, hour=0, min=0, sec=0, tz="") regts.zoo <- zooreg( NA, regts.start, regts.end, deltat=3600 ) Upon inspection: > regts.zoo[1:3] 2002-01-01 00:00:00 2002-01-01 01:00:00 2002-01-01 02:00:00...
2010 Oct 27
1
Regular time series with irregular start and end dates
...n dates and time series analysis and nothing seems to cover my question. I am extracting data from a time series of remote sensing data. The frequency of the data is 16 days which means I cant use ts (ts likes months single days etc) and have thus been trying to replicate the following dates using ISOdatetime. 09/13/2005 09/29/2005 10/15/2005 10/31/2005 11/16/2005 12/02/2005 12/18/2005 So far, the only method I have found to be successful is the following a<-ISOdatetime(2005, 9, c(13,29), 0, 0, 0) b<-ISOdatetime(2005, 10, c(15,31), 0, 0, 0) c<-ISOdatetime(2005, 11, c(16), 0, 0, 0) d<-IS...
2012 Jul 19
1
as.POSIXct questions
The following three calls all produce the same result (my machine is in EST): > as.POSIXct(0, tz="", origin=ISOdatetime(1970,1,1,10,0,0)) [1] "1970-01-01 10:00:00 EST" > as.POSIXct(0, tz="EST", origin=ISOdatetime(1970,1,1,10,0,0)) [1] "1970-01-01 10:00:00 EST" > as.POSIXct(0, tz="GMT", origin=ISOdatetime(1970,1,1,10,0,0)) [1] "1970-01-01 10:00:00 EST" EST i...
2007 Oct 09
1
Read in date fomat while colClasses="character"
Hi R users, I am using xlsReadWrite to read a particular excel file. In one of the columns I have dates ( say col=5). Now date column is read by default as numeric. So I used dateTimeAs= "isodatetime". This enables reading in the date format. However in the earlier column (say col=1) I have data which however starts from row 10. So to read data from column one I use colClasses="character". But this overrules the isodatetime. Now is there someway I can read in date format while...
2009 Jul 24
1
adjusting grid on Xaxis ticks
...I have been trying to plot correctly a graph for 2 month now, with no success.I want to put a grid, adjusted on the X axis tickers. Here is the way I build my X-Axis and my grid: grid(11, NULL, col="grey40") axis(2) # build the tickers on the beginning of each monthticks.at <- seq(ISOdatetime(lastYear, 01, 01, hour=0, min=0, sec=0, tz="GMT"), ISOdatetime(lastYear, 12, 31, hour=0, min=0, sec=0, tz="GMT"), by = "months") ticks.lab <- format(ticks.at, format = "%b") Axis(ISOdatetime(lastYear, substr(index(xts1),6,7), substr(index(xts1),9,10), hour...
2002 Apr 08
1
Problem(?) in strptime()
...standard time to daylight savings time. My timezone, US/Pacific, has two parts: standard time (PST) 8 hours behind GMT and daylight savings time (PDT) 7 hours behind GMT. The transition takes place this year on 7 April at 02:00, when 02:00 is re-labeled 03:00. ## April 6, 01:30 and 02:30 > ISOdatetime(2002, 4, 6, 1:2, 30, 0,tz='GMT') [1] "2002-04-05 17:30:00 PST" "2002-04-05 18:30:00 PST" ## April 7 , 01:30 and 02:30 > ISOdatetime(2002, 4, 7, 1:2, 30, 0,tz='GMT') [1] "2002-04-06 17:30:00 PST" "2002-04-06 17:30:00 PST" The dates suppli...
2008 May 21
3
Converting a 'difftime' to integer - How to???
I want to find the DOY (Day of Year) of some dates. I think to substract the date 1. January from the data to achive this. Something like: > d <- as.Date("2006-03-13") - as.Date("2006-01-01") +1 > d Time difference of 72 days So far so good. But d is a 'difftime' object. How do I get an Integer value from that? I tried severel things, incuding the
2008 Jan 27
1
bug in difftime with as.POSIXct
...ems to have problems with my method, since the fractional day is sometimes the correct 0.5 and sometimes the incorrect 0.46. I am doing this on with R-2.6.1 on a powerpc-apple-darwin8.10.1 system. I get the same results for as.POSIXlt() instead of as.POSIXct(), but the problem goes away if I use ISOdatetime for the first date in the difference. Since I have a workaround, I am mainly posting this as a bug report, and also as a cautionary note, in case other folks search the forum for similar issues. > difftime(as.POSIXct("1975-04-26"),ISOdatetime(1899,12,31,12,0,0),units="days&quo...
2008 Apr 10
1
ISOdate/ISOdatetime performance suggestions, other date/time questions
Dear list: working with date/times I have come across a problem that ISOdate and ISOdatetime are too slow on large vectors of data. I was surprised just until I looked at the implementation and the man page: "ISOdatetime and ISOdate are convenience wrappers for strptime". In other terms, they convert data to character representation first in order to create a POSIXlt object that...
2003 Dec 04
4
bug in as.POSIXct ?
I think that there is a bug in the as.POSIXct function on Windows. Here is what I get on Win2000, Pentium III machine in R 1.8.1. > dd1 <- ISOdatetime(2003, 10, 26, 0, 59, 59) > dd2 <- ISOdatetime(2003, 10, 26, 1, 0, 0) > dd2 - dd1 Time difference of 1.000278 hours Now, the 26th of October was the day that change to the standard time occurred, so I suspect that this has something to do with that. In fact > dd1 [1] "2003-10-26...
2008 Jul 27
2
Colors in Sweave
...ing tex document I replaced all instances of \begin{Sinput}... \end{Sinput} with {\color{midnightblue}\begin{Sinput} ... \end{Sinput}} and darkred for Soutput and so on. When I do this, I get the following error message: === LaTeX excerpt === \begin{Schunk} {\color{midnightblue}\begin{Sinput} > ISOdatetime(1970, 1, 1, 0, 0, 0, "") - ISOdatetime(1970, 1, 1, + 0, 0, 0, "GMT") \end{Sinput}} {\color{darkred}\begin{Soutput} Time difference of 8 hours \end{Soutput}} \end{Schunk} === === error message === ) ! FancyVerb Error: Extraneous input `}\end{}' between \end{Sinput} an...
2010 May 10
1
System neutral Daylight Savings Time response?
I'm searching for an r command that will notify me if I create a time that does not exist due to Daylight Savings Time. For example, if I run the following command on a windows machine > ISOdatetime(2010,03,14,2,10,0, tz = "") # My system time is set to the United States Central Time Zone [1] NA R returns NA, which is the behavior I want. However, if I run the same command on a mac, R returns a POSIXct object and I have to examine the object manually to notice that I had tried to cr...