1. 27 Oct, 2020 2 commits
    • rpereira2's avatar
      Update callers of HistoricalData to pass in Time as parameters · 62895180
      rpereira2 authored
      Previously, `HistoricalData.date` was a `date`. When doing date range
      calculations such as `HistoricalData.where(
      Date.parse('2020-10-20')..Date.parse('2020-10-23'))`, any records
      containing 20th or 23rd are included in the result.
      
      However, with `HistoricalData.date` as a timestamp with time zone,
      20th would be included (since the time component is assumed to be 00:00)
      but 23rd would be excluded.
      
      In order to include both days, we need to use
      `.beginning_of_day` and `.end_of_day`. Both methods are time zone aware
      and will use the `Time.zone` if available.
      62895180
    • rpereira2's avatar
  2. 23 Oct, 2020 38 commits