Reputation: 115
I am trying to convert a ISO 8601 timestamp to a Unix timestamp using Shell.
MediaWiki sadly only supports ISO 8601 timestamps, but I need one in Unix. So is there an easy way I can convert this? Any help would be appreciated.
Upvotes: 2
Views: 167
Reputation: 613
With the date
util on Unix-systems, you can do e.g.
$ date -d "2017-02-18T23:54:57+01:00" "+%s"
1285716915
The result is the Unix timestamp.
Upvotes: 1