This is one of those questions that I'm sure will have a quick answer but I can't seem to find it.
Using the Facebook Graph API, the opening hours for a business are returned in JSON using this format:
"hours": {
"mon_1_open": 406800,
"mon_1_close": 437400,
"tue_1_open": 493200,
"tue_1_close": 523800,
"wed_1_open": 579600,
"wed_1_close": 610200,
"thu_1_open": 61200,
"thu_1_close": 91800,
"fri_1_open": 147600,
"fri_1_close": 178200,
"sat_1_open": 237600,
"sat_1_close": 264600,
"sun_1_open": 324000,
"sun_1_close": 345600
}
The hours should be 0900 - 1730 weekdays, 1000-1730 Saturdays & 1000-1600 Sundays.
I can se开发者_如何转开发e there are 30600 seconds between opening and closing on weekdays, so it's a number of seconds since something, but I'm not sure since what.
What kind of time format is this, and how can I convert it into something usable in PHP?
Bonus: Why would they use a timestamp "since" something, seeing as the hours recur weekly?
I'm not sure what TimeZone you're in, but looking at it, hey all seem to be exact second counts originating from 00:00:00Z Thursday morning. I'd say that puts you at about the PST timezone.
精彩评论