Skip to content

Commit

Permalink
Make timeBasedSeq DST-aware (fix #67)
Browse files Browse the repository at this point in the history
timeBasedSeq may create duplicate values due to DST because it uses
"day" resolution instead of "DSTday" when calling seq.POSIXt. "day"
ignores changes to/from DST and "DSTday" takes the same clock time each
day.
  • Loading branch information
joshuaulrich committed Apr 25, 2015
1 parent 6d195da commit 615a167
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/timeBasedSeq.R
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ function(x, retclass=NULL, length.out=NULL) {
if(max.resolution == 0)
max.resolution <- 1

resolution <- c('year','month','day','hour','mins','secs')[max.resolution]
resolution <- c('year','month','DSTday','hour','mins','secs')[max.resolution]

if(!is.na(BY)) resolution <- names(match.arg(BY, list(year ='Y',
month ='m',
Expand Down

0 comments on commit 615a167

Please sign in to comment.