Session Ready
Exercise

Timezones in the weather data

Did you ever notice that in the hourly Auckland weather data there was another datetime column, date_utc? Take a look:

tibble::glimpse(akl_hourly)

The datetime column you created represented local time in Auckland, NZ. I suspect this additional column, date_utc represents the observation time in UTC (the name seems a big clue). But does it really?

Use your new timezone skills to find out.

Instructions
100 XP

The data is available in the akl_hourly data frame.

  • What timezone are datetime and date_utc currently in? Examine the head of the datetime and date_utc columns to find out.
  • Fix datetime to have the timezone for "Pacific/Auckland".
  • Reexamine the head of the datetime column to check the times have the same clocktime, but are now in the right timezone.
  • Now tabulate up the difference between the datetime and date_utc columns. It should be zero if our hypothesis was correct.