Datetime-API

command module
v0.0.0-...-6abf017 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 23, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

README

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/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
}

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL