-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set TZ in transformer to America/New_York from EDT #188
Set TZ in transformer to America/New_York from EDT #188
Conversation
Thanks for working on this @ThorntonMatthewD We do have the TZ .env variable that I think becomes the config/app.php as the 'timezone'. I suspect we shouldn't hard code the timezone. Or, we could pull from the config, and use the New York as the default value if the config isn't set? https://laravel.com/docs/10.x/configuration#accessing-configuration-values |
I ran Matt's PR as a patch on stage and it fixed the issue, so I ran it on the live site too. I guess there's a chance we have a problem again when daylight savings reverts, but the hardcoded EDT in the app/Data/EventDataTransformer.php seems like a fair chance of being the issue. I think we should pull the America/New_York from the Laravel config, instead of hard coding it. So, that's the main thing I think we should change on this PR. Thanks Matt. |
@ThorntonMatthewD were you trying to do anything more on this PR, or is it ready to go? |
@allella The couple of unit tests were all I was after since yesterday. Since those are up I think this iteration of the TZ fix is ready for review. |
^ I actually forgot to change back one last thing. NOW things are good. 😄 |
Summary
Switches the timezone used for casting event times in
EventDataTransformer
from using a type 2 "EDT" timezone to a type 3 "America/New_York" timezone that will automatically account for daylight savings time.Testing Plan
php artisan pull:events
/events
/calendar
page to see that the same issue exists there.php artisan pull:events
/events
and/calendar
pages. The times should now appear correctly.