Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Max-time should default to today when parsing the timestamp #31

Open
leonsodhi opened this issue Nov 26, 2013 · 4 comments
Open

Max-time should default to today when parsing the timestamp #31

leonsodhi opened this issue Nov 26, 2013 · 4 comments

Comments

@leonsodhi
Copy link

papertrail --min-time '12:30' --max-time '14:30' will return results after 14:30 today.

A workaround is to explicitly specify today:
papertrail --min-time '12:30' --max-time 'today 14:30'

@ghost ghost assigned lmarburger Nov 27, 2013
@lmarburger
Copy link
Contributor

That's odd. Chronic parses 24- and 12-hour times differently. It's 21:00 right now and "13:00" returns 1pm tomorrow but "1:00pm" returns 1pm today (8 hours ago).

@lmarburger
Copy link
Contributor

>> Time.now                    #=> 2013-11-27 21:28:12 -0500
>> Chronic.parse '13:00'       #=> 2013-11-28 13:00:00 -0500
>> Chronic.parse '13:00 today' #=> 2013-11-27 13:00:00 -0500
>> Chronic.parse '1:00'        #=> 2013-11-27 13:00:00 -0500

@troy
Copy link
Contributor

troy commented Nov 28, 2013

That is funny. Nice find. We may be using an ancient Chronic, for all I know.

@lmarburger
Copy link
Contributor

As far as I can tell, I'm using the latest.

$ bundle show
Gems included by the bundle:
  * addressable (2.3.5)
  * bundler (1.3.5)
  * chronic (0.10.2)
  * faraday (0.8.8)
  * faraday_middleware (0.8.8)
  * multipart-post (1.2.0)
  * papertrail (0.9.7 0379be8)
  * rake (0.8.7)
  * yajl-ruby (1.1.0)

$ bundle outdated
Outdated gems included in the bundle:
  * faraday_middleware (0.9.0 > 0.8.8)
  * rake (10.1.0 > 0.8.7)

@lmarburger lmarburger removed their assignment Apr 9, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants