Module: Strava::Models::Mixins::StartDateLocal
- Extended by:
- ActiveSupport::Concern
- Included in:
- DetailedActivity, DetailedSegmentEffort, Lap, SummaryActivity, SummarySegmentEffort
- Defined in:
- lib/strava/models/mixins/start_date_local.rb
Overview
Provides local start date/time with timezone handling.
This mixin adds the start_date_local property and handles proper timezone conversion. The offset is calculated from the difference between start_date (UTC) and start_date_local, which correctly accounts for daylight saving time (unlike Strava's 'timezone' property, which only reflects the zone's standard GMT offset).
This is particularly important for activities that cross timezone boundaries or for displaying times in the athlete's local timezone.