JSON Feed时间戳

时间:2017-11-16 11:54:32

标签: json timestamp fullcalendar unix-timestamp

我正在使用FullCalendar JS插件来构建我正在构建的工具,我正在创建一个JSON Feed。

        "id": "'.$row['AppointmentID'].'",
        "title": "'.$row['AppointmentName'].'",
        "url": "'.$row['URL'].'",
        "class": "event-important",
        "start": "1364407286400"
    },

开头的时间戳是1364407286400我对我的生活无法理解这个时间戳是如何形成的。我认为这是Unix,但是我为今天生成了一个时间戳并替换了它,它仍然没有显示。

有人能指出我正确的方向吗?

1 个答案:

答案 0 :(得分:2)

这是一个以毫秒为单位的时间戳。您可以使用以下方法轻松测试此值:

No configuration file found and no entry configured via CLI option.
When using the CLI you need to provide at least two arguments: entry and output.
A configuration file could be named 'webpack.config.js' in the current directory.
Use --help to display the CLI options.

输出将是:

$test = (int)(1364407286400/1000);
var_dump((new DateTime())->setTimestamp($test));