Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
2017-01-04 Dirk Eddelbuettel <edd@debian.org>

* src/Date.cpp (Rcpp): Protect assignment to tm_gmtoff to not being
under MinGW; could potentially bite other too-limited systems

* inst/unitTests/runit.Date.R (test.Datetime.formating): Do not set TZ
when running test, only set digits option

2017-01-01 Dirk Eddelbuettel <edd@debian.org>

* inst/unitTests/runit.Date.R (test.mktime, test.gmtime): New tests
Expand Down
4 changes: 0 additions & 4 deletions inst/unitTests/runit.Date.R
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,6 @@ if (.runThisTest) {
}

test.Datetime.formating <- function() {
oldTZ <- Sys.getenv("TZ")
Sys.setenv(TZ="America/Chicago")

olddigits <- getOption("digits.secs")
options("digits.secs"=6)

Expand All @@ -234,7 +231,6 @@ if (.runThisTest) {
format(d, "%Y-%m-%d %H:%M:%OS"),
msg="Datetime.formating.ostream")

Sys.setenv(TZ=oldTZ)
options("digits.secs"=olddigits)
}

Expand Down
5 changes: 3 additions & 2 deletions src/Date.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1347,9 +1347,10 @@ struct tzhead {
idays -= ip[tmp->tm_mon];
tmp->tm_mday = (int) (idays + 1);
tmp->tm_isdst = 0;
//#ifdef HAVE_TM_GMTOFF
#if ! (defined(__MINGW32__) || defined(__MINGW64__))
//#ifdef HAVE_TM_GMTOFF
tmp->tm_gmtoff = offset;
//#endif
#endif
return tmp;
}

Expand Down