Class: RailsAutoscaleAgent::TimeRounder

Inherits:
Object
  • Object
show all
Defined in:
lib/rails_autoscale_agent/time_rounder.rb

Class Method Summary collapse

Class Method Details

.beginning_of_minute(time) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/rails_autoscale_agent/time_rounder.rb', line 6

def self.beginning_of_minute(time)
  Time.new(
    time.year,
    time.month,
    time.day,
    time.hour,
    time.min,
    0,
    time.utc_offset
  )
end