title: How to keep strings in yaml from getting converted to times
body: <p>I have a yaml file which contains some times:</p>
  
  <pre><code>  hours:
      - 00:00:00
      - 00:30:00
      - 01:00:00
  </code></pre>
  
  <p>But as soon as I read them they get converted to time (in seconds), but I want them to remain as strings for a moment so i can do the conversion. Here's how I'm reading them:</p>
  
  <pre><code>  def daily_hours
      DefaultsConfig.hours.collect {|hour|
        logger.info { hour.to_s }
      }
    end
  </code></pre>
  
  <p>And it's outputting:</p>
  
  <blockquote>
    <p>0 1800 3600</p>
  </blockquote>
  
  <p>But I want the strings to remain unchanged to I can convert them to times such as:</p>
  
  <blockquote>
    <p>12:00am 12:30am 1:00am</p>
  </blockquote>
  
  <p>Why are they getting converted automatically, and how can I stop it?</p>
  
  <p>Here's the DefaultConfig class:</p>
  
  <pre><code>class DefaultsConfig  
    def self.load
      config_file = File.join(Rails.root, "config", "defaults.yml")
  
      if File.exists?(config_file)
        config = ERB.new(File.read(config_file)).result
        config = YAML.load(config)[Rails.env.to_sym]
        config.keys.each do |key|
          cattr_accessor key
          send("#{key}=", config[key])
        end
      end
    end
  end
  DefaultsConfig.load
  </code></pre>