similar to: Enhancement suggestion: POSIXt0

Displaying 20 results from an estimated 6000 matches similar to: "Enhancement suggestion: POSIXt0"

2003 Sep 17
3
Using POSIX?t rather than "chron" or "date"
The problem with POSIXt is that you must consider timezones and daylight vs. standard time issues even if you don't want to. This violates modularity (viz. your routines becomes coupled to unrelated information) and leads to subtle errors where different routines are assuming different time zones. The problem is that the time, date, day of the week, month, etc. of a date depend on its
2010 Feb 01
1
Error with cut.POSIXt and daylight savings time switchover dates
The following code: cut(as.POSIXct("2009-11-01 04:00:00", tz="America/Los_Angeles"), "1 day") gives the error: Error in seq.int(0, to - from, by) : 'to' must be finite This is related to November 1st, 2009 being the switchover date from daylight savings time to standard time in the America/Los_Angeles time zone. In particular, in cut.POSIXt, the starting
2002 May 03
1
Daylight savings time and conversion to POSIXt (arghh!)
I have asked this question before, and received some suggestions for work-arounds that get the job done--and they are much appreciated. But I would still like to find out if I'm missing something, and whether there is a direct way using POSIXt functions (as.POSIXct, as.POSIXlt, strptime, in particular). I have environmental data collected once per minute. Here is a subset of 3 input
2002 May 12
0
{round,trunc}.POSIXt and daylight savings time (PR#1543)
I have found what looks like a small problem in trunc.POSIXt() involving the transition to/from standard time and daylight savings time. Assuming my assessment is correct, I have a potential solution to offer. If a time in daylight savings time is rounded such that the rounded value is on the other side of the transition, the isdst element does not get changed accordingly. I have tested only
2005 Jul 11
0
Sys.timzone() returns NA - problem caused by as.POSIXlt? (PR#8003)
This is not a bug in R: the documentation does say the result is OS-specific. `GMT' is a not a proper timezone on Windows, so NA is a valid answer. (Windows seems to use GMT to refer to the timezone of the UK, e.g. > Sys.time() [1] "2005-07-11 07:49:56 GMT Daylight Time" > Sys.timezone() [1] "GMT Daylight Time" although I am in British Summer Time not GMT.)
2008 May 14
1
Time differences (as.difftime?) issue
Dear all, I have a vector generated using the function strptime: > my.dt [1] "2004-04-19 08:35:00 W. Europe Daylight Time" "2004-04-19 09:35:00 W. Europe Daylight Time" "2004-04-19 11:35:00 W. Europe Daylight Time" [4] "2004-04-19 13:35:00 W. Europe Daylight Time" "2004-04-20 07:50:00 W. Europe Daylight Time" > class(my.dt) [1]
2010 Mar 18
1
probable timezone confusion with as.yearmon
It looks like a timezone issue, and it's causing confusion to me at least. My original data: gmt <- c("19880101 0000", "19880101 0100", "19880101 0300", "19880101 0400", "19880101 0500", "19880101 0600") These were converted to local dates/times with akst<-strptime(gmt,format="%Y%m%d %H%M")-(3600*9) # because I want
2017 May 18
0
[R] R-3.4.0 fails test
> On 18 May 2017, at 14:51, peter dalgaard <pdalgd at gmail.com> wrote: > > >> On 18 May 2017, at 13:47 , Joris Meys <jorismeys at gmail.com> wrote: >> >> Correction: Also dlt uses the default timezone, but POSIXlt is not recalculated whereas POSIXct is. Reason for that is the different way values are stored (hours, minutes, seconds as opposed to minutes
2004 Mar 30
1
seq.POSIXt() bug not fixed in R 1.8.1 (PR#4558)
I am still experiencing problems with seq.POSIXt() missing off the last day of the series: > seq(as.POSIXct("2004-03-25"),as.POSIXct("2004-03-31"),by="DSTdays") [1] "2004-03-25 GMT Standard Time" "2004-03-26 GMT Standard Time" "2004-03-27 GMT Standard Time" [4] "2004-03-28 GMT Standard Time" "2004-03-29 GMT Daylight
2017 May 18
2
[R] R-3.4.0 fails test
> On 18 May 2017, at 14:58 , Martyn Plummer <plummerM at iarc.fr> wrote: > > > >> On 18 May 2017, at 14:51, peter dalgaard <pdalgd at gmail.com> wrote: >> >> >>> On 18 May 2017, at 13:47 , Joris Meys <jorismeys at gmail.com> wrote: >>> >>> Correction: Also dlt uses the default timezone, but POSIXlt is not recalculated
2017 May 18
0
[R] R-3.4.0 fails test
Correction: Also dlt uses the default timezone, but POSIXlt is not recalculated whereas POSIXct is. Reason for that is the different way values are stored (hours, minutes, seconds as opposed to minutes from origin, as explained in my previous mail) CHeers Joris On Thu, May 18, 2017 at 1:45 PM, Joris Meys <jorismeys at gmail.com> wrote: > This has to do with your own timezone. If I run
2006 Aug 25
1
How to get back POSIXct format after calculating with hist() results
Hi, I have a casting/formatting question on hist.POSIXt: The histogram plot from POSIXct works perfect (with help of Prof. Ripley -thanks!). When processing the hist(plot=FALSE) output and then plotting the results over the x-axis (bins) coming from hist(), I lose the date/time labels, getting instead integers displayed. Trying to cast the $breaks with as.POSIXct gives silly results with
2009 Nov 12
1
xts conversion problem
I have two data frames, with two columns each, the first being a Date variable. I would like to convert them to xts objects, indexed by the Date column. I would like to use as.Date and not as.POSIXct as the dateformat. The puzzling fact is that it works for the first one but not the other. Here is a screenshot of the error: > str(DF1) 'data.frame': 367 obs. of 2 variables: $
2007 Nov 01
0
daylight saving / time zone issues with as.POSIXlt/as.POSIXct (PR#10393)
tplate at acm.org wrote: > Running under Windows XP 64 bit, as.POSIXlt()/as.POSIXct() seem > to think that US time zones (EST5EDT, MST7MDT) switched from daylight > savings back to standard time on Oct 28, 2007, whereas the switch > is actually on Sun Nov 04, 2007. > > =20 Not Our Problem. (This sort of thing never is. We are wholly dependent=20 on the OS for this information).
2017 May 18
2
[R] R-3.4.0 fails test
This has to do with your own timezone. If I run that code on my computer, both formats are correct. If I do this after Sys.setenv(TZ = "UTC") Then: > cbind(format(dlt), format(dct)) [,1] [,2] [1,] "2016-12-06 21:45:41" "2016-12-06 20:45:41" [2,] "2016-12-06 21:45:42" "2016-12-06 20:45:42" The reason for that, is that
2020 Oct 23
0
The presence/absence of `zone` in POSIXlt depending on time zone as a cause of possible inconsistences?
?Hi again, I take advantage of my previous mail to ask you a question for which I was looking for an answer when detected the behaviour I previously told. In the help of DataTimeClasses one can read: "POSIXlt" objects will often have an attribute "tzone", a character vector of length 3 giving the time zone name from the TZ environment variable and the names of the base time
2007 Oct 30
1
timezone conversion difficulties with the new US daylight saving time switch over
I'm having difficulties with daylight saving times in US time zones. (Apologies for the long post, but the problem seems subtle and complex, unless I'm doing something completely wrong, in which case it should be evident from the first 10 lines below.) This is what I see, using a (slightly modified) example from ?as.POSIXlt : > as.POSIXlt((d <- Sys.time()), "EST5EDT") #
2007 Nov 01
1
daylight saving / time zone issues with as.POSIXlt/as.POSIXct (PR#10392)
Running under Windows XP 64 bit, as.POSIXlt()/as.POSIXct() seem to think that US time zones (EST5EDT, MST7MDT) switched from daylight savings back to standard time on Oct 28, 2007, whereas the switch is actually on Sun Nov 04, 2007. Examples: > Sys.timezone() [1] "Mountain Daylight Time" > as.POSIXct("2007-10-30 12:38:47") [1] "2007-10-30 12:38:47 Mountain
2006 Jul 14
2
chron vs. POSIX
Hi, One of the big decisions when writing code is how to handle dates and times. Gabor Grothendieck provided an excellent overview of the issue in his R News 4/1 (2004) article, and many users and developers are probably using it as a guide. The proposed guideline is to use the simplest class required; as Gabor put it "use Date if possible, otherwise use chron, and otherwise use
2017 May 18
2
[R] R-3.4.0 fails test
> On 18 May 2017, at 13:47 , Joris Meys <jorismeys at gmail.com> wrote: > > Correction: Also dlt uses the default timezone, but POSIXlt is not recalculated whereas POSIXct is. Reason for that is the different way values are stored (hours, minutes, seconds as opposed to minutes from origin, as explained in my previous mail) > I would suspect that there is something more subtle