How can I receive tweets sent in last hour in a correct time order?


#1

I am migrating v1 search api in my ‘search in twitter’ class to v1.1 search api…

Basically everything works fine. But…

I can’t receive tweets in a correct time order. Also there is a problem with time shown. It is a few hours different from my timeline. But when I check tweets, I can see them in the last feed.

["created_at"]=>
      string(30) "Thu Jun 13 02:48:42 +0000 2013"

for example, the time above should have been 5:51:something…

I am using these options to create my query :

  function setOptions($hash_tag, $rpp = '5') {
    $this->hash_tag = $hash_tag;
    $this->options .=  'lang=tr';
    $this->options .=  '&q='.urlencode($hash_tag);
    $this->options .=  '&count='.$rpp;
    $this->options .=  '&result_type=recent';
    $this->options .=  '&locale=tr';
  }

My first question is : How can I receive tweets sent in last hour in an order? (newest to oldest)
My second question is : I am creating a data warehouse so times are important for me. Is there a way to fix that time string for me?