lib/barometer/weather_services/weather_bug.rb in barometer-0.7.2 vs lib/barometer/weather_services/weather_bug.rb in barometer-0.7.3
- old
+ new
@@ -125,10 +125,10 @@
def self._build_forecast(data, metric=true)
raise ArgumentError unless data.is_a?(Hash)
forecasts = Measurement::ResultArray.new
# go through each forecast and create an instance
if data && data["aws:forecast"]
- start_date = Date.strptime(data['date'], "%a, %d %b %Y %H:%M:%S %Z")
+ start_date = Date.strptime(data['date'], "%m/%d/%Y %H:%M:%S %p")
i = 0
data["aws:forecast"].each do |forecast|
forecast_measurement = Measurement::Result.new
icon_match = forecast['aws:image'].match(/cond(\d*)\.gif$/)
forecast_measurement.icon = icon_match[1].to_i.to_s if icon_match
\ No newline at end of file