Displaying 20 results from an estimated 10000 matches similar to: "Problem(?) in strptime()"
2005 Oct 25
2
strptime problem for 2004-10-03 02:00:00
Hello, I at first thought this was a system or locale issue, but since
it occurs on
both 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
2002 Apr 08
1
Problem(?) in strptime() -- short version
I decided my earlier email on this topic was rather long and wordy;
here's a condensed version.
I am sitting at a Solaris computer in the US/Pacific timezone.
I have a file of data having times that includes the following three values
2002-4-7 1:30:00 GMT
2002-4-7 2:30:00 GMT
2002-4-7 3:30:00 GMT
I have not been able to find a way to correctly convert these to
either of the POSIX
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
2007 Jan 08
1
Does strptime(...,tz="GMT") do anything?
Hi All
In trying to correlate some tide gauge data I need to deal with varying
timezones. From the documentation on strptime, it seemed that the tz
variable might have some effect on the conversion, but I'm not seeing an
effect.
> strptime("20061201 1:02 PST",format="%Y%m%d %H:%M",tz="PST")+0
[1] "2006-12-01 01:02:00 EST"
>
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
2004 Aug 18
1
Fwd: strptime() problem? - Resolved
Hi Gabor and everybody;
Thanks Gabor, with the alternative step you've told me the problem is
resolved. Comparing the two procedures:
Extract from the source 'character' data:
> rain$ts[2039:2046]
[1] "25/03/2000 22:00:00 UTC" "25/03/2000 23:00:00 UTC"
[3] "26/03/2000 00:00:00 UTC" "26/03/2000 01:00:00 UTC"
[5] "26/03/2000 02:00:00
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]
2016 Feb 04
3
Fwd: [musl] strptime() question
There is incompatibility between R strptime and musl libc. I posted
about it on their mailing list, but they need more information I can't
provide, so I'm forwarding the message here in hope R developers can
help. Thanks.
---------- Forwarded message ----------
From: Rich Felker <dalias at libc.org>
Date: Thu, Feb 4, 2016 at 2:07 PM
Subject: Re: [musl] strptime() question
To: Alba
2005 Nov 10
4
write.table read.table with Dates
I've found several similar issues with write.table/read.table
with Dates on this list, but trying to follow this advice I still
get an error.
First, I read in data from several files, constructing several date/time
columns using ISOdatetime
> str(Tall$Begin)
'POSIXct', format: chr [1:40114] "2005-10-02 00:00:00" "2005-10-02
00:00:00" ...
> length(Tall$Begin)
2004 Aug 17
3
Fwd: strptime() problem?
Hi all;
I've already send a similar e-mail to the list and Prof. Brian Ripley
answered me but my doubts remain unresolved. Thanks for the clarification,
but perhaps I wasn't clear enough in posting my questions.
I've got a postgres database which I read into R. The first column is
Timestamp with timezone, and my data are already in UTC format. An 'printed'
extract of R
2011 Aug 05
3
excel dates and times in R
Hello,
I am having some fun dealing with dates and times. My input is a excel csv
file with two columns with data in the following format:
date time
25-Jun-1961 04:00:00
i.e. day - month - year hour:min:sec
I would like to have a single object in R that combines these and converts
them into a sensible R format (e.g.
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 is then
2013 Jan 11
1
Date time conversion bug (as.POSIXct)?
There is something wrong, I think, with the date-time conversion from a
numeric value if you use Central European Time (CET) as timezone.
Examples from R:
If I use the GMT time zone it is OK, I get the same time back from
as.POSIXct as I entered
> as.POSIXct(as.numeric(strptime("30/01/2012 13:00:00", format="%d/%m/%Y
>
2006 Jan 06
1
Daylight Savings Time unknown in R-2.2.1
Under R-2.2.1, a POSIXlt date created with "strptime" has an unknown
Daylight Savings Time flag:
> strptime(20051208, "%Y%m%d")$isdst
[1] -1
This is true on both Linux (details below) and Windows. It did not
occur under R-2.1.0. Any ideas? TIA!
> Sys.getenv("TZ")
TZ
""
Version:
platform = i686-pc-linux-gnu
arch = i686
os = linux-gnu
2004 Aug 17
1
strptime() bug? And additional problem in package "tseries"
Hi all, I've got some problems with irts objects, one of which could be a bug:
1) Read a table with several columns from Postgres and the first column is
Timestamp with timezone (this is OK). An extract is:
raincida$ts:
[2039] "25/03/2000 22:00:00 UTC" "25/03/2000 23:00:00 UTC"
[2041] "26/03/2000 00:00:00 UTC" "26/03/2000 01:00:00 UTC"
[2043]
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
2009 Jul 24
1
adjusting grid on Xaxis ticks
Hello,
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"),
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
2005 Dec 05
1
Automatic time zone conversion
Dear R-help,
I was trying to convert a date and time record extracted from a fortran
subroutine I worte and I encounter some problem. The data read in time
and date in a format like "2000-05-11_01:00:00.0000" in fortran output.
It is in GMT. I need to convert it to CST (GMT+8). I did the following
steps.
> cdate
[1] "2000-05-11_01:00:00.0000\005\003"
# I am not sure
2003 Sep 02
1
convert character to POSIXct
Dear list-members,
I would like to calculate the difference between two points in time. To convert a 'time (GMT)'-character with the format "1/1/1999 01:01:01" into an object of class "POSIXct"', I first use the strptime() as suggested in the details help(as.POSIXct).
e.g.
starttime<-strptime("1/1/1999 01:01:01",format="%d/%m/%Y %H:%M:%S")