title: Using Ruby & Github API to filter commits by date
body: <p>I am using the <a href="https://github.com/pengwynn/octokit" rel="nofollow">ruby gem 'octokit'</a> which implements the Github API v3.  Mostly works great but I cannot seem to filter by date.  I believe I have the syntax and time format correct, but it appears my option is ignored and the API returns the past 35 entries regardless of the since or until dates.  </p>
  
  <p>Here's a minimal reproducible example (after installing the octokit gem).  </p>
  
  <pre><code>require 'octokit'
  require 'time'
  
  @day = "2012-09-27"
  @until = DateTime.parse(@date).iso8601
  @since = (DateTime.parse(@day) - 60*60*48).iso8601
  a = Octokit.commits({:username =&gt; "cboettig", :repo =&gt; "labnotebook", :since =&gt; @since, :until =&gt; @until})
  </code></pre>
  
  <p>see the date of the output of last entry</p>
  
  <pre><code>a.last.commit.author.date
  </code></pre>
  
  <p>explicit day doesn't work either</p>
  
  <pre><code>b = Octokit.commits({:username =&gt; "cboettig", :repo =&gt; "labnotebook", :since =&gt; "2012-09-27T00:00:00+00:00"})
  
  b.last.commit.author.date
  </code></pre>
  
  <p>The date I get in both examples is from August, outside the specified range given.  What did I miss? </p>
  
  <p><strong>Background</strong>: I'm trying to write a little Jekyll plugin that uses the API to return commits made to a specified repo on the day of the post.</p>