search for: tz

Displaying 20 results from an estimated 1311 matches for "tz".

2023 Oct 16
1
creating a time series
Why did you expect to have 177647 elements ? I found that 177642 is the correct number: Marc baslangic <- as.POSIXct("2017-11-02 13:30:00", tz = "CET") bitis <- as.POSIXct("2022-11-26 23:45:00", tz = "CET")? # zaman_seti <- seq.POSIXt(from = baslangic, to = bitis, by = 60 * 15) y2017_11_02 <- seq(from=as.POSIXct("2017-11-02 13:30:00", tz = "CET"), to=as.POSIXct("2017-11-02...
2006 Mar 07
4
POSIX time zone codes
The manual entry for as.POSIX says this about time zone codes... Usage as.POSIXct(x, tz = "") tz A timezone specification to be used for the conversion... but it fails to mention what these "specifications" are. So far, I have tried... as.POSIX(x, tz="UTC") ... works, gives UTC times as.POSIX(x, tz="UTC") ... works, gives EST times as.PO...
2023 Oct 16
1
Ynt: creating a time series
...t; G?nderildi: 16 Ekim 2023 Pazartesi 13:43 Kime: r-help at r-project.org <r-help at r-project.org> Konu: Re: [R] creating a time series Why did you expect to have 177647 elements ? I found that 177642 is the correct number: Marc baslangic <- as.POSIXct("2017-11-02 13:30:00", tz = "CET") bitis <- as.POSIXct("2022-11-26 23:45:00", tz = "CET") # zaman_seti <- seq.POSIXt(from = baslangic, to = bitis, by = 60 * 15) y2017_11_02 <- seq(from=as.POSIXct("2017-11-02 13:30:00", tz = "CET"), to=as.POSIXct("2017-11-02 2...
2013 Oct 04
2
Possible POSIXlt / wday glitch & bugs.r-project.org status
...be invariant to the timezone of a date. That is, the same date/time instant of 5th October 2013 in both Australia/Sydney and UTC should be a Saturday (i.e. wday = 6). And indeed that is the case with 1 min past midnight on 5 October 2013: ``` library(lubridate) d_utc <- ymd_hms(20131005000001, tz='UTC') d_local <- ymd_hms(20131005000001, tz='Australia/Sydney') as.POSIXlt(x=d_utc, tz=tz(d_utc))$wday # 6 as.POSIXlt(x=d_local, tz=tz(d_local))$wday # 6 ``` But this isn't always the case. For example, ``` d_utc <- ymd_hms(20381002000001, tz='UTC') d_local <...
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" > strptime("20061201 1:02 PST",format="%Y%m%d %H:%M&quo...
2008 Dec 09
3
difftime
Hi. I'm trying to take the difference in days between two times. Can you point out what's wrong, or suggest a different function? When I try the following code, The following code works fine: a <- strptime(1911100807,format="%Y%m%d%H",tz="GMT") b <- strptime(1911102718,format="%Y%m%d%H",tz="GMT") x <- difftime(b, a, units="days") x But when I change the year, the following code returns 'NA' for the time between a and b. Thanks. a <- strptime(1999100807,format="%Y%m%d...
2013 Aug 22
1
From POSIXct to numeric and back with time zone
...answers. I have chosen one question and one problem. The question, which should be trivial, should allow me to solve the problem. However, I have been stuck with this all day so if anyone know the solution to the problem straight away, it will be highly appreciated. The question: What does the tz attribute in POSIXct do? As an example, two dates with different time zone attributes, tmp1 and tmp2, are compared. > tmp1 = as.POSIXct('2000-01-30',origin = '1970-01-01', tz = "UTC") > tmp1 [1] "2000-01-30 UTC" > tmp2 = as.POSIXct('2000-01-...
2003 Aug 04
0
as.POSIXct Bug when used with POSIXlt arg and tz= arg (PR#3646)
...related. Conversion of POSIXlt datetimes to POSIXct appears to have problems. Consider the following where lt1 and lt2 are both POSIXlt dates that correspond to the same date even though they were created using different statements. Even though lt1 and lt2 represent the same date, as.POSIXct(lt1,tz="") and as.POSIXct(lt2,tz="") differ by one hour. One clue is that the isdst flag is set in lt1 but not in lt2. However, both lt1 and lt2 are GMT dates and either the isdst flag should not be set or at least subsequent processing should not depend on it. Furthermore, even tho...
2013 Jan 11
1
Date time conversion bug (as.POSIXct)?
...rsion 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 > %H:%M:%S",tz="GMT")),origin="1970-01-01",tz="GMT") [1] "2012-01-30 13:00:00 GMT" If I go from CET to GMT there is also no problem: >as.POSIXct(as.numeric(strptime("30/01/2012 13:00:00", format="%d/%m/%Y %H:%M:%S",tz="CET")),origin=&quot...
2006 Sep 12
3
Weird TZ Behavior in 4.1p1 and 4.3p2 on AIX
...rade from 3.8p1 so I can use PAM for PasswordAuthentication in addition to keyboard-interactive. I have compiled both 4.1p1 and 4.3p2 and the PAM authentication for both methods works fine in both releases, but I have a weird annoyance in the logging. The timestamp code appears to be ignoring the TZ setting. Here is a snippet from the logfile where I changed back and forth from 3.8p1 and 4.1p1 as I logged in ~ 9:30 this morning: 09/12/06 09:34:52 username hostname.xxxxx.com 09/12/06 09:35:02 username authenticating locally 09/12/06 09:35:02 username local authentication succeeded 09/12...
2005 Oct 25
2
strptime problem for 2004-10-03 02:00:00
...s.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] "2005-10-03 02:00:00 GMT" ISOdatetime(2005, 10, 3, 1, 0, 0, tz...
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). Thi...
2023 Oct 16
2
creating a time series
Hello everyone, ? had 15 minutes of data from 2017-11-02 13:30:00 to 2022-11-26 23:45:00 and number of data is 177647 ? would like to ask why my time series are less then my expectation. baslangic <- as.POSIXct("2017-11-02 13:30:00", tz = "CET") bitis <- as.POSIXct("2022-11-26 23:45:00", tz = "CET") # zaman_seti <- seq.POSIXt(from = baslangic, to = bitis, by = 60 * 15) length(zaman_seti) [1] 177642 but it has to be 177647 and secondly ? have times in this format ( 2.11.2017 13:30/DD-MM-Y...
2002 Apr 08
1
Problem(?) in strptime()
...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 supplied are one day apart. The...
2004 Jun 26
1
Problem setting environment variable in R/zzz.R
I am trying to get the Rmetrics.org component package fBasics by Diethelm Wuertz into a Debian package. Thanks to a lot of work by Diethelm, it is _almost_ there. It fails 'R CMD check' for me if I do not have the TZ environment variable set [1], yet works fine as long as I set TZ. I figured I could patch this in R/zzz.R and do ## set a timezone if none found in...
2017 May 17
3
problem running test on a system without /etc/localtime
...imezone()) Error in normalizePath("/etc/localtime") : (converted from warning) path[1]="/etc/localtime": No such file or directory Calls: Sys.timezone -> normalizePath Execution halted This is caused by this code: > Sys.timezone function (location = TRUE) { tz <- Sys.getenv("TZ", names = FALSE) if (!location || nzchar(tz)) return(Sys.getenv("TZ", unset = NA_character_)) >> lt <- normalizePath("/etc/localtime") [remainder of the code skkipped] File /etc/loclatime is optional and is not guaranteed to...
2020 Apr 24
4
Timezone conversion on Ubuntu 20.04
Hi all, I am testing R 4.0 and ran into an issue with timezones on Ubuntu Focal: converting a timestamp to another timezone results in NA: as.POSIXct(as.POSIXlt(Sys.time(), tz = "CET"), tz = "EST") This only happens on Ubuntu Focal, it seems to work fine on Ubuntu Bionic. I am the standard ubuntu docker image icw/ r-base from Dirk's ppa:edd/r-4.0 on both systems. Am I missing a system dependency for tzone data? Jeroen
2004 Mar 05
2
3.8p1 not honoring TZ environment variable
Hello, I just built openssh 3.8p1 on an HP-UX 11i machine. All looks well except for the timezone. I'm noticing now that when it logs stuff to syslog, it's off by 2 hours for me. What I've figured is this: My timezone is MST7MDT (mountain time). The timezone in /etc/default/tz is EST5EDT (eastern time). There's a 2 hour difference between mountain & eastern time. What I'm thinking is the real problem, is that it is not looking at the TZ environment variable to get its own setting for the timezone when it starts up, and so it just uses the default in /etc/...
2010 Jan 12
0
Wishlist: Function 'difftime' to honor 'tzone' attribute (PR#14182)
Full_Name: Suharto Anggono Version: 2.8.1 OS: Windows Submission from: (NULL) (125.165.84.118) PR#14076 inspired me to write this. > t1 <- as.POSIXct("1970-01-01 00:00:00", tz="GMT") > t2 <- as.POSIXlt("1970-01-01 00:00:00", tz="GMT") > t1 - t2 Time difference of 7 hours Above, t1 and t2 represent the same time in the same specified timezone. Therefore, it is reasonable if their difference is zero. The result is like above because...
2012 Sep 16
1
possible TZ bug in parseISO8601 - "Error in if (length(c(year, month, day, hour, min, sec)) == 6 && c(year, : [...]"
...day, hour, min, sec)) == 6 && c(year, : missing value where TRUE/FALSE needed Available environments had calls: 1: FindHighRow(dateTable, theTimeSeries, 2, 3) 2: #4: searchVector[dateFilter] 3: #4: `[.xts`(searchVector, dateFilter) 4: .parseISO8601(ii, .index(x)[1], .index(x)[nr], tz = tz) 5: as.POSIXlt(do.call(lastof, parse.side(intervals[2], intervals[1]))) 6: do.call(lastof, parse.side(intervals[2], intervals[1])) 7: function (year = 1970, month = 12, day = 31, hour = 23, min = 59, sec = 59, subsec = 0.99999, tz = "") { if (!missing(sec) && sec%%1...