zachleat/Humane-Dates — Issue #4: twitter JSON date (created_at) passed as a string doesn't recognize time zone
Author: jasonreposa
Created: 2012-01-27 18:43:16+00:00
State: open

If you take some JSON from twitter and pass the created_at property as a string to humaneDate, it will fail to adjust to your time zone.

However, if you pass it a date object it will work.

E.g.,

created_at: "Fri Jan 27 18:40:26 +0000 2012"

Fails: humaneDate("Fri Jan 27 18:40:26 +0000 2012") -> 6 Hours Ago

Pass: humaneDate(new Date("Fri Jan 27 18:40:26 +0000 2012") -> 1 Minute Ago