871 B
871 B
Datetime-API
As a fan of TimeAPI.io, but not third party providers in general, I wanted my self-hosted alternative. Basically, with this project I just wanted to create a very simple API that gives me a JSON object with many useful datetime values for a given timezone. The timezone has to be specified in IANA timezone format.
Usage
neo@matrix:~$ curl -s -H "Accept: application/json" "http://localhost:9100/Time/current/zone?timeZone=Europe/Berlin" | jq
{
"year": 2023,
"month": 6,
"day": 13,
"hour": 13,
"minute": 37,
"seconds": 00,
"milliSeconds": 000,
"dateTime": "2023-06-13T13:37:00+02:00",
"date": "06/13/2023",
"time": "13:37",
"timeZone": "Europe/Berlin",
"dayOfWeek": "Tuesday",
"dstActive": true
}