如何将GMT时间戳转换为Unix时间戳(javascript)

如何将GMT时间戳转换为Unix时间戳(javascript)

问题描述:

我正在解析一个rss feed,每个条目都有一个时间戳,如下所示:2009-09-21T21:24:43 + 04:00
有没有办法将这个日期格式转换为unix时间戳使用javascript?

I'm parsing an rss feed and each entry has a timestamp such as this: 2009-09-21T21:24:43+04:00 Is there any way to convert this date format to a unix timestamp with javascript?

我只想记录最新的rss输入日期,但我需要将GMT时间或Unix时间戳的时间标准化为此。

I just want to be able to record the latest rss entry date, but I need to standardize the time to GMT time or Unix timestamp to do this.

格式似乎是ISO-8601。假设情况属实,此博客为此提供了一个javascript解决方案。

The format appears to be ISO-8601. Assuming that is true, this blog provides a javascript solution to this.