[R-pkg-devel] Issue handling datetimes: possible differences between computers

2022-10-09 Thread Alexandre Courtiol
Hi R pkg developers, We are facing a datetime handling issue which manifests itself in a package we are working on. In context, we noticed that reading datetime info from an excel file resulted in different data depending on the computer we used. We are aware that timezone and regional settings

Re: [R-pkg-devel] Issue handling datetimes: possible differences between computers

2022-10-09 Thread Simon Urbanek
Alexandre, it's better to parse the timestamp in correct timezone: > foo = as.POSIXlt("2021-10-01", "UTC") > as.POSIXct(as.character(foo), "Europe/Berlin") [1] "2021-10-01 CEST" The issue stems from the fact that you are pretending like your timestamp is UTC (which it is not) while you want to

Re: [R-pkg-devel] Issue handling datetimes: possible differences between computers

2022-10-09 Thread Jeff Newmiller
... which is why tidyverse functions and Python datetime handling irk me so much. Is tidyverse time handling intrinsically broken? They have a standard practice of reading time as UTC and then using force_tz to fix the "mistake". Same as Python. On October 9, 2022 6:57:06 PM PDT, Simon Urbanek