mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 23:30:12 +01:00
Replace it with a class called DateUtils with a method called `#midnight_for` that takes a preference instance and date to convert to midnight.
5 lines
156 B
Ruby
5 lines
156 B
Ruby
class DateUtils
|
|
def self.midnight_for(prefs, date)
|
|
ActiveSupport::TimeZone[prefs.time_zone].local(date.year, date.month, date.day, 0, 0, 0)
|
|
end
|
|
end
|