Skip to content

Instantly share code, notes, and snippets.

@kcurtin
Created November 15, 2012 03:15
Show Gist options
  • Save kcurtin/4076431 to your computer and use it in GitHub Desktop.
Save kcurtin/4076431 to your computer and use it in GitHub Desktop.
WTF?
Tweet.where('created_at > ?','2012-11-15 02:18:28')
Tweet Load (0.5ms) SELECT "tweets".* FROM "tweets" WHERE (created_at > '2012-11-15 02:18:28') ORDER BY published_at DESC
=> [#<Tweet id: 30, content: "RARARA", published_at: "2012-11-15 02:18:28", handle: nil, created_at: "2012-11-15 02:18:28", updated_at: "2012-11-15 02:18:28", person_id: 1>]
#Aren't the created_at dates equal? So the query should return false...
'2012-11-15 02:18:28'.to_datetime.in_time_zone('UTC')
#=> Thu, 15 Nov 2012 02:18:28 UTC +00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment