Generate an RFC 3339 timestamp similar to Google Tasks API?

前端 未结 7 2192
时光取名叫无心
时光取名叫无心 2020-12-02 20:45

I am in the process of building an app that syncs with Google Tasks. As part part of the syncing, I want to compare the local task and the API task, and see which one has be

7条回答
  •  攒了一身酷
    2020-12-02 20:55

    The Z behind the first date indicates it's UTC (Zulu) time, without the Z it will use the local (computer) time, which could be several time zones off.

    See: http://en.wikipedia.org/wiki/UTC

提交回复
热议问题