You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Ambrose Chua 9784bef263
ci: Fix Docker tagging
2 years ago
.github/workflows ci: Fix Docker tagging 2 years ago
assets Add basic interaction 3 years ago
data Add country code 3 years ago
scripts Big change 3 years ago
templates Initial scaffold for search 3 years ago
third-party Version control 3rd party assets 3 years ago
.dockerignore Initial Dockerfile 3 years ago
.gitignore Initial Dockerfile 3 years ago
Dockerfile fix: Incorrect Golang image 2 years ago
LICENSE Create LICENSE 3 years ago
Makefile Add basic interaction 3 years ago
NOTES.md More notes 3 years ago
README.md Minor tweak to README, add some of my notes 3 years ago
app.go Initial very slow search implementation 3 years ago
apperror.go Split files into smaller parts 3 years ago
go.mod Add URL parser 3 years ago
go.sum Add URL parser 3 years ago
logger_development.go [Action] go fmt 2 years ago
logger_production.go [Action] go fmt 2 years ago
main.go Logging with zap and increase modular split 3 years ago
mime.go Add search endpoint 3 years ago
mime_test.go Add zone parsing, and test code separately 3 years ago
search.go Initial very slow search implementation 3 years ago
search_test.go Initial very slow search implementation 3 years ago
template.go Initial scaffold for search 3 years ago
template_test.go Split files into smaller parts 3 years ago
templatehelpers.go Add search endpoint 3 years ago
url.go Initial very slow search implementation 3 years ago
url_test.go Initial very slow search implementation 3 years ago
zone.go Use flexbox to ellipsise city name 3 years ago
zone_test.go Split files into smaller parts 3 years ago
zonecity.go Split files into smaller parts 3 years ago
zonecity_test.go Split files into smaller parts 3 years ago
zoneoffset.go Render and accept the minus sign, tweak weights 3 years ago
zoneoffset_test.go Render and accept the minus sign, tweak weights 3 years ago

README.md

datetime.link

Readable links to a point in time

Credits

Reporting Problems

File an issue on GitHub.

Rationale

Sometimes, you want to refer to a point in time, and also want to provide a timezone converter for them. datetime.link provides links to points in time and presents them in a set of selected timezones and/or local time.

Compatibility

To ensure compatibility with non-JavaScript clients, the server responds with a pure HTML page without local time. JavaScript provides the rendering of local time and local time format using the native Intl and Date APIs, eventually the Temporal API. JavaScript also provides the visual editing interface for the date, time and list of timezones to show in.

Timezone Specifiers

GeoNames data is used to generate data/cities.json, a huge 5MB JSON blob containing cities with a population greater than 15000. In the event this is not enough, more cities can be included by using the alternate cities5000.txt file.

The timezone specifiers are generated by the code in scripts/data.go, which assemble an identifier replacing non-alphanumeric and quote characters with underscores. Dashes then are used to join the city name, administrative division level 1 names and country names.

Alternatively, a fixed timezone can be specified as an offset like +08:00. This caters for scenarios where the local DST and other local time differences should not be accounted for. These are guarenteed to be stable and accurate.

Timezone Data

Go relies on local tzdata, and thus datetime.link relies on it too.

Upcoming Improvements

See Issues.