Skip to content

Commit

Permalink
Use UTC for saarland scraper dates
Browse files Browse the repository at this point in the history
Had failing tests because of daylight saving time

references robbi5#119
  • Loading branch information
robbi5 committed Apr 4, 2019
1 parent 0dd3591 commit 86f13a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/scrapers/saarland_scraper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def self.extract_date(entry)
dotnet_serialized_date = entry['PublicDate']
seconds_since_epoch = dotnet_serialized_date.scan(/[0-9]+/)[0].to_i / 1000.0

Time.at(seconds_since_epoch).to_date
Time.at(seconds_since_epoch).utc.to_date
end

def self.extract_title(entry)
Expand Down

0 comments on commit 86f13a3

Please sign in to comment.