nov/fb_graph — pull request #195 by micahwedemeyer (2012-02-20 17:28:56+00:00)
Title: Accept multiple Time formats for page_hours_format

This is a resubmission of pull request 189. We had to move things around in our repository to get these commits onto a feature branch. I apologize for breaking the original pull request.

Here's some of the original text:

Ryan: The hours on the Graph API are suppose to come back as 10:00; however, it looks like for many pages its still coming back as a Fixnum. This fix allows for parsing of both Time values and Fixnums.

Nov: I think it is based on "page_hours_format" setting on the app's advanced setting tab, not per page setting.
And I recommend to turn on the setting for better timezone handling.

Micah: Actually, I think the patch is pretty good as it makes fb_graph more flexible and allows it to accept both types of time values. It could be that someone cannot change the page_hours_format due to depending on another library or codebase that expects it to be a certain way. By being as flexible as possible, fb_graph is more likely work with other less flexible libraries.