Unix Timestamp converter REST API

Convert Unix Timestamps to DateTime objects and DateTime objects to Unix Timestamps

This WebService was built using Linx (https://linx.software), a rapid development and API hosting platform.
This WebService is hosted on a Linx cloud server.


GET Methods

Unix Timestamp to UTC DateTime (yyyy-MM-dd HH:mm:ss) with string response

https://showcase.linx.twenty57.net:8081/UnixTime/fromunix?timestamp=1549892280
Response:
2019-02-11 13:38:00

Unix Timestamp to UTC DateTime (yyyy-MM-dd HH:mm:ss) with JSON object response

https://showcase.linx.twenty57.net:8081/UnixTime/fromunixtimestamp?unixtimestamp=1549892280
Response:
{"Datetime":"2019-02-11 13:38:00"}

DateTime (multiple formats) to Unix Timestamp with string response

https://showcase.linx.twenty57.net:8081/UnixTime/tounix?date=2019/02/11 13:38:00
Response:
1549892280

Current DateTime (multiple formats) to Unix Timestamp with string response

https://showcase.linx.twenty57.net:8081/UnixTime/tounix?date=now
Response:
Current UnixTimeStamp as integer

DateTime (multiple formats) to Unix Timestamp with JSON object response

https://showcase.linx.twenty57.net:8081/UnixTime/tounixtimestamp?datetime=2019/02/11 13:38:00
Response:
{"UnixTimeStamp":"1549892280"}

Current DateTime as UnixTimestamp

https://showcase.linx.twenty57.net:8081/UnixTime/tounixtimestamp?datetime=now
Response:
{"UnixTimeStamp":"1549971762"}

POST Methods

Unix Timestamp to DateTime with timezone (yyyy-MM-dd'T'HH:mm:ssXXX)

https://showcase.linx.twenty57.net:8081/UnixTime/fromunixtimestamp
---------------
Body:
{"UnixTimeStamp": "1589772280","Timezone": ""}
Response:
{"Datetime":"2020-05-18T03:24:40Z"}
---------------
Body:
{"UnixTimeStamp": "1589772280","Timezone": "+3"}
Response:
{"Datetime":"2020-05-18T06:24:40+03:00"}

DateTime (multiple formats) to Unix Timestamp

https://showcase.linx.twenty57.net:8081/UnixTime/tounixtimestamp
---------------
Body:
{"Datetime": "2019/02/11 13:38:00"}
Response:
{"UnixTimeStamp":"1549892280"}
---------------
Body:
{"Datetime": "2019-03-13 16:00:00"}
Response:
{"UnixTimeStamp":"1552492800"}

Errors

https://showcase.linx.twenty57.net:8081/UnixTime/fromunixtimestamp?unixtimestamp=-99999999991
Response:
{"Error":"Fromunixtimestamp.FromUnixTimestamp: The added or subtracted value results in an un-representable DateTime.\r\nParameter name: value"}

License