Converting time to unix timestamp

MOHAMED

I have the following time format

"2014-06-02T16:23:13+02:00"

I want to convert it to the unix timestamp (since 1/1/1970). For the above example, The command should return:

1401725705

Are there a linux command for that?

Kent
date -d"2014-06-02T16:23:13+02:00" +%s 

should work if you have a newer GNU coreutil. I tested with v8.22 latest.

if you are on a elder coreutil box like 8.4. it won't work, you could try replace the T with space. use string "2014-06-02 16:23:13+02:00" in date -d"2014-06-02 16:23:13+02:00" +%s

this is tested on Red Hat Enterprise Linux Server release 6.5 (Santiago) with coreutil 8.4

$>date -d"2014-06-02 16:23:13+02:00" +%s                                    
1401718993

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

converting unix timestamp to local time

From Java

Pyspark unix_timestamp striping the last zeros while converting from datetime to unix time

From Dev

PHP Converting A Date to Unix Timestamp

From Dev

CQLSH: Converting unix timestamp to datetime

From Dev

Converting unix time to DateTime

From Dev

Converting a timestamp string to UNIX timestamp in MonetDB

From Dev

Pandas converting row with unix timestamp (in milliseconds) to datetime

From Dev

Converting NodaTime to Unix timestamp and the importance of LocalDateTime

From Dev

Converting a UNIX timestamp into a Date object in Elm

From Dev

Converting date with timezone in UNIX timestamp Shell/Bash

From Dev

Converting date to UNIX time in Logstash

From Dev

pyspark converting unix time to date

From Java

Convert a Unix timestamp to time in JavaScript

From Dev

SQL Loader Timestamp to UNIX time

From Dev

Laravel timestamp saving time as unix timestamp

From Dev

time conversion from Unix timestamp to ISO timestamp

From Java

How to parse unix timestamp to time.Time

From Dev

converting php string with date and time to sql timestamp

From Dev

Converting TimeStamp to readable time ago in PHP and Android

From Dev

Converting timestamp to time ago in PHP - Plurality

From Dev

Converting timestamp in a dataframe to date and time in python

From Dev

Converting Unix time to "minutes ago" in JavaScript

From Dev

Converting Unix Time into Human Readable Format in Excel

From Dev

BusyBox Date Command Set Time with UNIX Timestamp

From Dev

Java convert unix timestamp to wrong time

From Dev

Convert UNIX timestamp to date time (javascript)

From Dev

php time() or mysql unix_timestamp()?

From Dev

How to convert UTC time to unix timestamp

From Dev

How to set system time from Unix timestamp

Related Related

  1. 1

    converting unix timestamp to local time

  2. 2

    Pyspark unix_timestamp striping the last zeros while converting from datetime to unix time

  3. 3

    PHP Converting A Date to Unix Timestamp

  4. 4

    CQLSH: Converting unix timestamp to datetime

  5. 5

    Converting unix time to DateTime

  6. 6

    Converting a timestamp string to UNIX timestamp in MonetDB

  7. 7

    Pandas converting row with unix timestamp (in milliseconds) to datetime

  8. 8

    Converting NodaTime to Unix timestamp and the importance of LocalDateTime

  9. 9

    Converting a UNIX timestamp into a Date object in Elm

  10. 10

    Converting date with timezone in UNIX timestamp Shell/Bash

  11. 11

    Converting date to UNIX time in Logstash

  12. 12

    pyspark converting unix time to date

  13. 13

    Convert a Unix timestamp to time in JavaScript

  14. 14

    SQL Loader Timestamp to UNIX time

  15. 15

    Laravel timestamp saving time as unix timestamp

  16. 16

    time conversion from Unix timestamp to ISO timestamp

  17. 17

    How to parse unix timestamp to time.Time

  18. 18

    converting php string with date and time to sql timestamp

  19. 19

    Converting TimeStamp to readable time ago in PHP and Android

  20. 20

    Converting timestamp to time ago in PHP - Plurality

  21. 21

    Converting timestamp in a dataframe to date and time in python

  22. 22

    Converting Unix time to "minutes ago" in JavaScript

  23. 23

    Converting Unix Time into Human Readable Format in Excel

  24. 24

    BusyBox Date Command Set Time with UNIX Timestamp

  25. 25

    Java convert unix timestamp to wrong time

  26. 26

    Convert UNIX timestamp to date time (javascript)

  27. 27

    php time() or mysql unix_timestamp()?

  28. 28

    How to convert UTC time to unix timestamp

  29. 29

    How to set system time from Unix timestamp

HotTag

Archive