Open tpemartin opened 2 years ago
@raychiu135, @Vincent23412, @410882009 Please check:
Parsing a date/time character vector without tz setting can yield wrong result.
Also make sure you choose the right tzone expression.
subsidiaries <- list()
subsidiaries$boston <- lubridate::ymd_hms(c("2020 Oct. 13 15:00:00", "2019 Apr. 10 09:30:00"),
tz="America/New_York")# boston time zone
subsidiaries$mykonos <- lubridate::dmy_hms(c("14 Jan., 2021 03:27:00", "8 Aug., 2020 11:20:00"),
tz="Europe/Athens") # mykonos time zone
lubridate::with_tz(
c(
subsidiaries$boston,
subsidiaries$mykonos
),
tz="Asia/Calcutta"
)
Tata corporate with head quarter in India Deli has two subsidiaries overseas. One is in Mykonos, Greece, and the other is in Boston, USA. It has to deal with the following task constant: receive time information from both subsidiaries and collect them all together with India time zone expression.
Consider the following subsidiaries time information:
Put all four time observation in one atomic vector with date/time class and expressed in Deli India time zone.