lib/timetrap/helpers.rb in timetrap-1.7.0 vs lib/timetrap/helpers.rb in timetrap-1.7.1
- old
+ new
@@ -34,11 +34,11 @@
elsif sheet =~ /.+/
Timetrap::Entry.filter('sheet = ?', sheet)
else
Timetrap::Entry.filter('sheet = ?', Timer.current_sheet)
end
- ee = ee.filter('start >= ?', Date.parse(Chronic.parse(args['-s']).to_s)) if args['-s']
- ee = ee.filter('start <= ?', Date.parse(Chronic.parse(args['-e']).to_s) + 1) if args['-e']
+ ee = ee.filter('start >= ?', Date.parse(Timer.process_time(args['-s']).to_s)) if args['-s']
+ ee = ee.filter('start <= ?', Date.parse(Timer.process_time(args['-e']).to_s) + 1) if args['-e']
ee
end
def format_time time
return '' unless time.respond_to?(:strftime)