scenarios with `tidyverse` date parsing resulting in incorrect timezone offsets when using `lubridate`
I'm working on a project and hit a roadblock. I've been struggling with this for a few days now and could really use some help. I've looked through the documentation and I'm still confused about I'm sure I'm missing something obvious here, but I'm currently working with an scenario with date parsing in R when using the `lubridate` package from the `tidyverse`. I have a dataset with date-time strings that include timezone information, but when I use `ymd_hms()` to parse these strings, the resulting date-times seem to have incorrect timezone offsets. For example, when I run the following code: ```r library(lubridate) # Sample date-time strings date_strings <- c("2023-10-01 12:00:00 UTC", "2023-10-01 12:00:00 America/New_York") # Parsing the date-time strings parsed_dates <- ymd_hms(date_strings) print(parsed_dates) ``` I expect the first date-time to remain in UTC and the second one to convert correctly to Eastern Time. However, the output shows that both dates are treated as UTC, which I find confusing: ``` [1] "2023-10-01 12:00:00 UTC" "2023-10-01 12:00:00 UTC" ``` I've tried explicitly converting the second date-time using `with_tz()` to see if it corrects the scenario, but that doesn't seem to help either: ```r parsed_dates_eastern <- with_tz(parsed_dates[2], tzone = "America/New_York") print(parsed_dates_eastern) ``` This results in: ``` [1] "2023-10-01 12:00:00 UTC" ``` I'm using R version 4.1.2 and `lubridate` version 1.8.0. Is there something I'm missing in the parsing process, or could this be a bug in the `lubridate` package? Any help in resolving this timezone scenario would be greatly appreciated! I'm on CentOS using the latest version of R. This issue appeared after updating to R 3.9. Is there a simpler solution I'm overlooking? I'm working in a macOS environment. Thanks for any help you can provide!