【问题标题】:FQL and business hoursFQL 和营业时间
【发布时间】:2011-02-24 02:25:43
【问题描述】:

我正在使用 FQL 从 Facebook 页面查询小型企业的信息,并尝试解析营业时间。我回来的数字似乎代表秒,但我不确定时代是什么时候。周三和周四是最令人困惑的 - 周四开放是“57600”,这将是 16 小时(以秒为单位),这将使周三下午 4 点成为纪元,但周三的收盘时间 - 远远超过 4 点 - 在 600,000+ 范围内。

周一:8:15am-12pm 和 1pm - 5pm 周二:8am-12pm 和 1pm - 5pm 周三:8am-12pm 和 1pm - 9pm 周四:8am-12pm 和 1pm - 5pm 周五:8am-12pm 和 1pm - 5pm周六:上午 8 点至下午 12 点和下午 1 点至下午 5 点

<hours>
      <mon_1_open>404100</mon_1_open>
      <mon_1_close>417600</mon_1_close>
      <tue_1_open>489600</tue_1_open>
      <tue_1_close>504000</tue_1_close>
      <wed_1_open>576000</wed_1_open>
      <wed_1_close>590400</wed_1_close>
      <thu_1_open>57600</thu_1_open>
      <thu_1_close>72000</thu_1_close>
      <fri_1_open>144000</fri_1_open>
      <fri_1_close>158400</fri_1_close>
      <sat_1_open>230400</sat_1_open>
      <sat_1_close>244800</sat_1_close>
      <sun_1_open>0</sun_1_open>
      <sun_1_close>0</sun_1_close>
      <mon_2_open>421200</mon_2_open>
      <mon_2_close>435600</mon_2_close>
      <tue_2_open>507600</tue_2_open>
      <tue_2_close>522000</tue_2_close>
      <wed_2_open>594000</wed_2_open>
      <wed_2_close>622800</wed_2_close>
      <thu_2_open>75600</thu_2_open>
      <thu_2_close>90000</thu_2_close>
      <fri_2_open>162000</fri_2_open>
      <fri_2_close>176400</fri_2_close>
      <sat_2_open>248400</sat_2_open>
      <sat_2_close>262800</sat_2_close>
      <sun_2_open>0</sun_2_open>
      <sun_2_close>0</sun_2_close>
    </hours>

如果我将其更改为周一至周六的早上 8 点至下午 5 点,我会收到来自 FB 的同样令人困惑的回复

<hours>
      <mon_1_open>403200</mon_1_open>
      <mon_1_close>435600</mon_1_close>
      <tue_1_open>489600</tue_1_open>
      <tue_1_close>522000</tue_1_close>
      <wed_1_open>576000</wed_1_open>
      <wed_1_close>608400</wed_1_close>
      <thu_1_open>57600</thu_1_open>
      <thu_1_close>90000</thu_1_close>
      <fri_1_open>144000</fri_1_open>
      <fri_1_close>176400</fri_1_close>
      <sat_1_open>230400</sat_1_open>
      <sat_1_close>262800</sat_1_close>
      <sun_1_open>0</sun_1_open>
      <sun_1_close>0</sun_1_close>
      <mon_2_open>0</mon_2_open>
      <mon_2_close>0</mon_2_close>
      <tue_2_open>0</tue_2_open>
      <tue_2_close>0</tue_2_close>
      <wed_2_open>0</wed_2_open>
      <wed_2_close>0</wed_2_close>
      <thu_2_open>0</thu_2_open>
      <thu_2_close>0</thu_2_close>
      <fri_2_open>0</fri_2_open>
      <fri_2_close>0</fri_2_close>
      <sat_2_open>0</sat_2_open>
      <sat_2_close>0</sat_2_close>
      <sun_2_open>0</sun_2_open>
      <sun_2_close>0</sun_2_close>
    </hours>

我是否遗漏了一些事实上的标准时间表示?有人会如何将其解析为一天中的合法时间?

【问题讨论】:

  • 如果您让我知道您使用什么语言进行 FQL 查询,我可以帮助您从结果中解析正确的时间。

标签: facebook facebook-fql


【解决方案1】:

Unix 纪元是时间00:00:00 UTC on 1 January 1970。每当您看到与基于计算机的时间相关的术语“纪元”时,通常就是这个意思。

在 UTC 中,404100 是 Mon, 05 Jan 1970 16:15:00 GMT。或者,在 PST 时区,Mon, 05 Jan 1970 08:15:00 PST,这是您期望的时间。忽略日期;无论如何,这无关紧要。

您可以使用Epoch Converter 测试我所描述的内容。

【讨论】:

  • 这似乎检查了。我使用 epoch 作为通用术语,因为我没有想到它们会代表使用 unix epoc 的时间并考虑星期几(1 月 1 日是 1970 年的星期四)。哦,我应该想到的。谢谢
猜你喜欢
  • 1970-01-01
  • 2018-01-21
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2020-02-13
  • 2015-04-11
  • 2014-05-31
  • 2011-02-12
相关资源
最近更新 更多