Skip to content

Commit

Permalink
Merge pull request paws-r#813 from DyfanJones/unix_time
Browse files Browse the repository at this point in the history
set unix_time seconds as numeric
  • Loading branch information
DyfanJones authored Jul 25, 2024
2 parents f04e086 + b431841 commit 3260119
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion paws.common/NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# paws.common 0.7.5
# paws.common 0.7.5 (development)
* build endpoint with host_prefix (#804), thanks to @joseale2310 and @lyschoening for raising issue.
* fix `unix_time` ensure seconds is numeric (#804), thanks to @joseale2310 and @lyschoening for raising issue.

# paws.common 0.7.4
* fix `transpose` to correctly parse lists with empty first elements (#791), thanks to @FMKerckhof for raising issue.
Expand Down
2 changes: 1 addition & 1 deletion paws.common/R/time.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Returns a date value, given the number of seconds since Jan 1, 1970.
unix_time <- function(sec, nsec = 0) {
time <- ISOdatetime(1970, 1, 1, 0, 0, 0, tz = "GMT") + sec
time <- ISOdatetime(1970, 1, 1, 0, 0, 0, tz = "GMT") + as.numeric(sec)
return(time)
}

0 comments on commit 3260119

Please sign in to comment.