Skip to content

Commit

Permalink
Merge pull request #1001 from wadpac/issue-1000-GENEActiv-timestamps
Browse files Browse the repository at this point in the history
g.getstarttime() should return same timestamp format for all sensor types.
  • Loading branch information
vincentvanhees authored Dec 18, 2023
2 parents 4e33a63 + 3baf2aa commit f350e27
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# CHANGES IN GGIR VERSION 3.0-3

- Part 1: Fix bug where on machines with GMT timezone and R >= 4.3.0, for GENEActiv .bin files, the starting timestamps of M$metalong and M$metashort were truncated to midninght #1000

# CHANGES IN GGIR VERSION 3.0-2

- Part 2: Fix bug that caused part 2 to struggle with corrupt ActiGraph .gt3x files #972
Expand Down
2 changes: 0 additions & 2 deletions R/g.getstarttime.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ g.getstarttime = function(datafile, P, header, mon, dformat, desiredtz, configtz
if (mon == MONITOR$AXIVITY && dformat == FORMAT$CWA) {
starttime = P$data[1,1]
starttime = as.POSIXlt(starttime, tz = desiredtz, origin = "1970-01-01")
starttime = POSIXtime2iso8601(starttime, tz = desiredtz)
} else if (mon == MONITOR$GENEACTIV && dformat == FORMAT$BIN) {
starttime = as.POSIXlt(P$data.out$time[1], tz = desiredtz, origin = "1970-01-01")
starttime = POSIXtime2iso8601(starttime, tz = desiredtz)
} else if (dformat == FORMAT$CSV && (mon == MONITOR$ACTIGRAPH || mon == MONITOR$AXIVITY || mon == MONITOR$VERISENSE)) {
if (mon == MONITOR$ACTIGRAPH || mon == MONITOR$VERISENSE) {
tmph = read.csv(datafile, nrow = 8, skip = 1)
Expand Down

0 comments on commit f350e27

Please sign in to comment.