rstudio - R rounds time to date -


by loading table of postgresql (rpostgresql) time rounds date. instead, "2015-01-28 03:04:01 cet" have "2015-01-28 cet", class "posixct" "posixt", not shows, "2015-01-28 00:00:00 cet". , on local mac, r in server receives same table without problems. rather, options. can help?

> command3 <- "select requested_at rides   city_id != 1;" > riders3 <- dbsendquery(con, command3) > riders_total <- fetch(riders3, n = -1) > riders_total$requested_at[1] [1] "2015-04-19 cest"     #####    "2015-04-19 03:04:31 cest" ! > riders_total$requested_at[1] + 1 [1] "2015-04-19 00:00:01 cest" > dput(head(riders_total, 10)) structure(list(requested_at = structure(c(1429394400, 1429653600,  1429653600, 1431468000, 1431468000, 1429394400, 1431468000, 1417993200,  1430085600, 1431468000), class = c("posixct", "posixt"), tzone = "")), .names = "requested_at", row.names = c(na,  10l), class = "data.frame") 

had simular problem date on different pc got different value. find 1 way resolve( simplist way without changing pc options) : using to_char in select , as.posixct in r


Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -