Skip to content
This repository has been archived by the owner on Oct 13, 2022. It is now read-only.

dates lose timezone attribute when you subset them #46

Open
limnoliver opened this issue Jun 20, 2018 · 1 comment
Open

dates lose timezone attribute when you subset them #46

limnoliver opened this issue Jun 20, 2018 · 1 comment

Comments

@limnoliver
Copy link
Member

@rbcarvin learned something new with this one! In RMevents, we find "start date" by subsetting by event and finding the minimum. When you subset dates like this, you drop the attributes of the data, which includes time zone. Then, R assigns a time zone, which is the time zone of your computer. So, this is why we're getting converted dates that are correct, but events that are an hour off during DST.

limnoliver added a commit to limnoliver/Rainmaker that referenced this issue Jun 20, 2018
…ut, this should fix issue USGS-R#46. Use dplyr to group by event and then get min and max dates. This allows the tz attributes to stay with data and not convert them to computer's time zone.
@rbcarvin
Copy link
Contributor

rbcarvin commented Sep 12, 2018

It looks like this same issue is occurring with RMevents_sample. @limnoliver

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants