Rafael Neves
Rafael Neves

Reputation: 467

What is wrong with this date and time?

I am using R 3.4.2 but the same error was happening in R 3.4.0. Apparently it is a bug, but I wish to know if someone else also gets the same error. Maybe it is something specific of my machine. I am using Windows 7, so I don't know if the same occurs in other OS:

# OK
as.POSIXct("2014-10-18 00:01",tz = "America/Sao_Paulo")
[1] "2014-10-18 00:01:00 -03"

# NOT OK
as.POSIXct("2014-10-19 00:01",tz = "America/Sao_Paulo")
Error in as.POSIXlt.character(x, tz, ...) : 
character string is not in a standard unambiguous format

Upvotes: 3

Views: 42

Answers (1)

G5W
G5W

Reputation: 37661

This date, Oct 19, 2014 was the day for moving the clocks back to end Daylight Savings Time. Sao Paulo changes the clock at 1AM (back to midnight) so this date/time means two different times. It is ambiguous. see Daylight Savings Time in Sao Paulo

Upvotes: 3

Related Questions