Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.Start your free trial
Why turn local_date into utc_date? Since local_date is already aware, shouldn't using local_date return the same result?
In the video, local_date (which is already aware) is turned into a UTC date called utc_date. Then utc_date is used display the meeting time in other timezones.
What's the added value of using the utc_time? If local_time is aware, can't we use it as it, without converting it as a utc_time?
Kenneth LoveTreehouse Guest Teacher
You can, yes, but it's usually cleaner and faster to convert from UTC time. Think of it like having a clean, common base for all of your classes or a stable, sane base template to extend all of your other templates from. Every timezone is defined by its offset from UTC, so converting from UTC to a given timezone is just plus or minus some amount of hours (and minutes for a few special places). Converting from a local timezone, though, usually requires moving back to UTC and then moving to the new timezone.