similar to: unwanted switch to DST with POSIXct objects

Displaying 20 results from an estimated 10000 matches similar to: "unwanted switch to DST with POSIXct objects"

2012 Apr 30
1
Subtract days to dates in POSIXct format
Hello, I'm having problems working with date values in POSIXct format. Here is what I got (eg.lig attached): x <- read.table("eg.txt", sep = ',', col.names=c("ok","time","secs","lig")) # it gives time as factor z <- cbind(x,colsplit(x$time, split="\\s", names=c("date", "clock")))
2013 Aug 22
1
From POSIXct to numeric and back with time zone
From POSIXct to numeric and back with time zone I am running regressions on data which has time series with different time resolution. Some data has hourly resolution, while most has either daily or weekly resolution. Aggregation is used to make the hourly data daily, while liner interpolation is used to find daily data from the weekly time series. This data manipulation requires some careful
2011 Feb 11
2
tzone and DST
I'm reading in ~3 years worth of data that includes hourly timestamps. Presumably to avoid DST confusion, all the data is in PST time zone -- no discontinuities in the spring or fall. The data comes in a csv file, which I'm reading with myvariable <- read.csv("my_data_file.csv",header=FALSE,
2013 Aug 25
3
POSIXct bug for conversion of specific combinations of date and time
Hello everyone, I'm having a big trouble with which seems to be a bug in as.POSIXct() date-time conversion. I have massive GPS datasets in which each location has it's own date and time attribute. As I convert them to POSIXct format, 1300 cases (of about half a million locations) simply return NA values. I picked up a small sample of failed cases and normal cases to demonstrate the
2012 Dec 13
1
duplicated.data.frame() and POSIXct with DST shift
Hi, I encountered the behavior, that the duplicated method for data.frames gives "false positives" if there are columns of class POSIXct with a clock shift from DST to standard time. time <- as.POSIXct("2012-10-28 02:00", tz="Europe/Vienna") + c(0, 60*60) time [1] "2012-10-28 02:00:00 CEST" "2012-10-28 02:00:00 CET" df <-
2012 Dec 06
1
Incorrect DST time changes in DateTimeClasses
Can anyone please shed any light on why R DateTimeClasses give weird times for when daylight saving time information changes, and which aren't consistent with the OS? Example: Expected result: in New Zealand DST stopped (NZDT -> NZST) at 03:00 NZDT on 2010-04-04, as confirmed by the OS time zone info (OS X 10.8.2): zdump -v /etc/localtime /etc/localtime Sat Apr 3 13:59:59 2010 UTC
2012 Jan 20
3
break an axis.POSIXct
Hi I like to use "axis.POSIXct" to plot days from 2006 till 2008. But I only have datas for the summer months. Is it possible to get two axis breaks, to have not so long distances without points? thx Christof
2009 Mar 10
4
puzzled by math on date-time objects
Hi, I don't understand the following. When I create a small artificial set of date information in class POSIXct, I can calculate the mean and the median: a = as.POSIXct(Sys.time()) a = a + 60*0:10; a [1] "2009-03-10 11:30:16 EDT" "2009-03-10 11:31:16 EDT" "2009-03-10 11:32:16 EDT" [4] "2009-03-10 11:33:16 EDT" "2009-03-10 11:34:16
2012 Jul 02
1
Undocumented behavior around daylight savings time?
Apologies for the intrusion. I am a lurker on list. I have been working to convert a digitized signal from a matlab file into R for analysis and other applications. R.matlab is working fine, and it is easy to convert the matlab date-time number (days since year 0) into R date-time numbers (seconds since 1970-01-01). Unfortunately, when I cast the R date-time number into POSIXct format it seems
2013 May 20
3
as.vector with mode="list" and POSIXct
I was trying to convert a vector of POSIXct into a list of POSIXct, However, I had a problem that I wanted to share with you. Works fine with, say, numeric: > v = c(1, 2, 3) > v [1] 1 2 3 > str(v) ?num [1:3] 1 2 3 > l = as.vector(v, mode="list") > l [[1]] [1] 1 [[2]] [1] 2 [[3]] [1] 3 > str(l) List of 3 ?$ : num 1 ?$ : num 2 ?$ : num 3 If you try it with POSIXct,
2012 Feb 02
1
Problem with GMT+/- time zones
I'm struggling with time zone version when expressed as hours offset from GMT. Can anyone confirm that the behaviour below is incorrect? It seems that the GMT offsets are backwards: > format(as.POSIXct("2011-05-23 17:23:00", tz="Europe/London"),tz="America/New_York",usetz=T) [1] "2011-05-23 12:23:00 EDT" - this works. >
2017 Aug 19
4
My very first loop!! I failed. May I have some start-up aid?
Dear all, I have a data similar to this: myframe<- data.frame (ID=c("Ernie", "Ernie","Ernie","Ernie"), Timestamp=c("24.09.2012 08:00", "24.09.2012 09:00", "24.09.2012 10:00", "25.09.2012 10:00"), Longitude=c("8.481","8.482","8.483","8.481"),
2012 Sep 05
2
POSIXlt and daylight savings time
I have a data frame that contains dates, but when I use as.POSIXlt() I lose the hours on all records. I traced this down to a particuar hour which causes the issue... > as.POSIXlt('2004-10-31 02:00:00') [1] "2004-10-31" > as.POSIXlt('2004-10-31 03:00:00') [1] "2004-10-31 03:00:00" How do I tell as.POSIXlt() to ignore daylight savings and just convert to
2017 Aug 19
0
My very first loop!! I failed. May I have some start-up aid?
Thank you for providing the example code... for the request of running it multiple times it would have helped if you could have confirmed that the example ran through without errors... there were a lot of mistakes in it. Look into using the reprex package to check your example next time. I don't do this kind of analysis... I really don't know what to expect from the functions. The
2005 Jan 13
2
subsetting like in SAS
Hi, Being in the process of translating some of my SAS programs to R, I encountered one difficulty. I have a solution, but it is not elegant (and not pleasant to implement). I have a large dataset with many variables needed to identify the origin of a sample, many to describe sample characteristics, others to describe site characteristics. I want only a (shorter) list of sites and their
2011 Mar 25
2
Preserving the class of POSIXt objects
Dear all, I am working with a list of objects each of which contains two POSIXct objects (say, $Start and $End) and a number of different data in addition to that. Now an easy way to extract Start times of all object could be sapply(x, "[", "Start") but this converts them all to numeric, and so does sapply(x, "[[", "Start"). lapply preserves the class but
2013 Dec 13
3
Minutes after midnight to time
Is there a quick function that can convert minutes (seconds) after midnight to a time? i.e 670.93 (minutes after midnight) --> 11:10:56.** I know it can be done by hand but I thought there must be a function for this already. Thank you. [[alternative HTML version deleted]]
2018 May 16
2
Date method of as.POSIXct does not respect tz
R 3.5.0 Is it intended that the Date method of as.POSIXct does not respect the tz parameter? I suggest changing as.POSIXct.Date to this: function (x, tz = "", ...) .POSIXct(unclass(x) * 86400, tz = tz) Currently, the best workaround seems to be using the character method if one doesn't want the default timezone (which is often an annoying DST timezone). This came up on
2003 Aug 04
0
as.POSIXct Bug when used with POSIXlt arg and tz= arg (PR#3646)
Tracking down this bug was joint work with Jermoe Asselin (jerome at hivnet.ubc.ca) and Patrick Connolly (p.connolly at hortresearch.co.nz). We collectively were able to determine that this is a problem in both Windows 2000 and in Linux and by testing it in our three time zones that it seems to be daylight savings time related. Conversion of POSIXlt datetimes to POSIXct appears to have problems.
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]