Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
[Bug] CJ() looses timezone of POSIXct vector #2029
I have a problem when using CJ() with POSIXct objects.
If CJ is used to construct a data.table from a POSIXct vector with timezone UTC and a second grouping vector, the resulting POSIXct column in the data.table has local timezone.
See below for a reproducible example and my sessionInfo(). Maybe related to (#1778)
Here is my sessionInfo()
Can confirm this.
As far as I can tell the reason behind this is mentioned explicitly in the comments for the
Couldn't one simply re-apply the attributes of the input columns to the output columns after the Cartesian product has been constructed, right around line 356 in https://github.com/Rdatatable/data.table/blob/fb03ad184de08535e28d772dfe172f5ddf384a52/R/setkey.R?