Skip to content

Support ICU extension and timezones for TIMESTAMPTZ converted to POSIXct and POSIXlt #184

@ggrothendieck

Description

@ggrothendieck

This gives back a UTC time zone even if the original was in the local time zone. duckdb has an icu extension and TIMESTAMPTZ type which may solve this. Not sure.

library(duckdb)
con <- dbConnect(duckdb())
d <- data.frame(d = as.POSIXct("2000-01-01 12:13:14"))
duckdb_register(con, "d", d)
out <- dbGetQuery(con, "from d")
##                     d
## 1 2000-01-01 17:13:14

dput(out)
## structure(list(d = structure(946746794, class = c("POSIXct", 
## "POSIXt"), tzone = "UTC")), class = "data.frame", row.names = c(NA,  <--------------- note UTC
## -1L))

dput(d)
## structure(list(d = structure(946746794, class = c("POSIXct", 
## "POSIXt"), tzone = "")), class = "data.frame", row.names = c(NA, 
## -1L))

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurea feature request or enhancementhelp wanted ❤️we'd love your help!

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions