mirror of
https://github.com/TracksApp/tracks.git
synced 2026-03-01 02:20:16 +01:00
Purge UserTime from app/*
This commit is contained in:
parent
7a3f90a020
commit
622291d98d
7 changed files with 10 additions and 12 deletions
|
|
@ -15,13 +15,13 @@ class Preference < ActiveRecord::Base
|
|||
date = nil
|
||||
|
||||
if s.is_a?(Time)
|
||||
date = s.in_time_zone(time_zone).to_date
|
||||
date = s.to_date
|
||||
elsif s.is_a?(String)
|
||||
date = Date.strptime(s, date_format)
|
||||
else
|
||||
raise ArgumentError.new("Bad argument type:#{s.class}")
|
||||
end
|
||||
|
||||
UserTime.new(user).midnight(date)
|
||||
date.in_time_zone(time_zone).beginning_of_day
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue