app/concepts/opening/create.rb
# generate imaginary timestamp for a specific day
generate imaginary timestamp for a specific day
generate imaginary timestamp for a specific day
def dummy_time_for_day(day:, open:, close:)
    if open && close
      hour = open.first(2).to_i
      min = open.last(2).to_i
      sec = close.first(2).to_i + close.last(2).to_i / 100.0
    else
      hour = min = sec = 0
    end
    Time.zone.local(1970, 1, day_nr(day), hour, min, sec, 0)
  end
def dummy_time_for_day ( day : , open : , close : ) if open && close hour = open . first ( 2 ) . to_i min = open . last ( 2 ) . to_i sec = close . first ( 2 ) . to_i + close . last ( 2 ) . to_i / 100.0 else hour = min = sec = 0 end Time . zone . local ( 1970 , 1 , day_nr ( day ) , hour , min , sec , 0 ) end
generate imaginary timestamp for a specific day
generate imaginary timestamp for a specific day
day
<not_specific>
open
<not_specific>
close
<not_specific>