Skip to content

Commit

Permalink
fix wrapBaseElement
Browse files Browse the repository at this point in the history
  • Loading branch information
eblondel committed Nov 3, 2022
1 parent b1f4c2d commit 4820e8f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/ISOAbstractObject.R
Original file line number Diff line number Diff line change
Expand Up @@ -1227,10 +1227,10 @@ ISOAbstractObject <- R6Class("ISOAbstractObject",
#'@param fieldObj field object
#'@param an object of class \link{R6Class}
wrapBaseElement = function(field, fieldObj){
dataType <- class(fieldObj)
dataType <- class(fieldObj)[1]

#specific coercing
if(all(dataType == c("POSIXct","POSIXt"))) dataType <- "datetime"
if(is(fieldObj, "POSIXt")) dataType <- "datetime"

#re-encoding (if needed)
if(tolower(dataType)=="character"){
Expand Down

0 comments on commit 4820e8f

Please sign in to comment.