qed-verein / qeddb-ruby

membership administration for Quod Erat Demonstrandum e.V.
GNU General Public License v3.0
0 stars 3 forks source link

fix: Use Time whereever possible, avoid DateTime and Date. #17

Closed Nicholas42 closed 3 months ago

Nicholas42 commented 3 months ago

Time is datezone aware, where Date is not and DateTime is not by default. One should also avoid .now and use .current, to get now in the correct time zone.

Resources: http://danilenko.org/2012/7/6/rails_timezones/ (A bit outdated since it doesn't have Time.current and Time.strptime works without explicit time zone in the mean time)