Have a look at the documentation for gtrends by typing ?gtrends in your console and checking out the docs online Package ‘gtrendsR’
If you look at the date variable in the interest_over_time data frame you qurey, you'll note it contains timezone information.
library(gtrendsR)
temp = gtrends(c("VCB"), geo = "VN", time = "now 7-d", gprop = c("web"), category = 7, hl = "en-US", low_search_volume = TRUE)
temp$interest_over_time$date[1]
#> [1] "2018-05-02 10:00:00 CEST"
attr(temp$interest_over_time$date[1],"tzone")
#> [1] "Europe/Berlin"
#> I happen to be in Europe...
Created on 2018-05-09 by the reprex package (v0.2.0).
It appears that gtrends sets time to your machine's timezone...? (not sure about that).
Also, sadly, I suggested saving your files as a CSV, which strips timezone info.
I'd check out the lubridate package's handy tz() function to help with this.. Note the wikipedia link for a list of timezone names.
You can use with_tz to change the timezone to whatever zone you want.
For example:
library(gtrendsR)
temp = gtrends(c("VCB"), geo = "VN", time = "now 7-d", gprop = c("web"), category = 7, hl = "en-US", low_search_volume = TRUE)
library(dplyr)
library(lubridate)
# Get Time Zone:
temp$interest_over_time$date %>% head(2)
#> [1] "2018-05-02 10:00:00 CEST" "2018-05-02 11:00:00 CEST"
tz(temp$interest_over_time$date)
#> [1] "Europe/Berlin"
# I happen to be in Berlin
# Set Time Zone: https://lubridate.tidyverse.org/reference/with_tz.html
temp$interest_over_time$date <- with_tz(temp$interest_over_time$date, "America/New_York")
temp$interest_over_time$date %>% head(2)
#> [1] "2018-05-02 04:00:00 EDT" "2018-05-02 05:00:00 EDT"
tz(temp$interest_over_time$date)
#> [1] "America/New_York"
Created on 2018-05-09 by the reprex package (v0.2.0).