{"id":18889471,"url":"https://github.com/peterfritz/time","last_synced_at":"2025-06-12T17:03:24.136Z","repository":{"id":231553844,"uuid":"782017504","full_name":"peterfritz/time","owner":"peterfritz","description":"Get the current time, timezone, and a language-sensitive representation of the current time in the local timezone based on the user's IP. Create and validate signed date tokens.","archived":false,"fork":false,"pushed_at":"2024-12-14T23:30:49.000Z","size":167,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-20T15:24:00.303Z","etag":null,"topics":["cryptography","date","time"],"latest_commit_sha":null,"homepage":"https://time.ptr.red/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/peterfritz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-04-04T13:33:20.000Z","updated_at":"2024-04-04T14:53:32.000Z","dependencies_parsed_at":"2024-04-04T16:04:55.520Z","dependency_job_id":"4945fa3c-58ab-457a-9635-770bed7119d5","html_url":"https://github.com/peterfritz/time","commit_stats":null,"previous_names":["peterfritz/time"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterfritz%2Ftime","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterfritz%2Ftime/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterfritz%2Ftime/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterfritz%2Ftime/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peterfritz","download_url":"https://codeload.github.com/peterfritz/time/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":256020999,"owners_count":22324715,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cryptography","date","time"],"created_at":"2024-11-08T07:49:06.537Z","updated_at":"2025-06-12T17:03:24.095Z","avatar_url":"https://github.com/peterfritz.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003chr /\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"#\"\u003e\n    \u003cimg src=\"src/app/icon.svg\" alt=\"time\" height=\"100\" \u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003e\n    time\n    \u003ca\n      href=\"https://www.youtube.com/watch?v=Qr0-7Ds79zo\"\n      target=\"_blank\"\n      rel=\"noopener noreferrer\"\n    \u003e\n      \u003ckbd\u003e↗\u003c/kbd\u003e\n    \u003c/a\u003e\n  \u003c/h1\u003e\n  \u003cp\u003e\n    \u003cb\u003e\n      Get the current time, timezone, and a language-sensitive representation of the current time in the local timezone based on the user's IP.\n    \u003c/b\u003e\n    \u003cbr /\u003e\n    \u003cb\u003e\n      Create and validate signed date tokens.\n    \u003c/b\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n\u003chr /\u003e\n\n## \u003ckbd\u003eGET\u003c/kbd\u003e `https://time.ptr.red/geo`\n\nGet the current time, timezone, and a language-sensitive representation of the current time in the local timezone based on the user's IP.\n\nThis API endpoint returns a JSON object with the following properties:\n\n```jsonc\n{\n  \"timezone\": \"Europe/Paris\", // IANA timezone\n  \"offset\": -120, // offset from UTC in minutes\n  \"time\": 1712238688600, // unix timestamp in milliseconds\n  \"unix\": 1712238688, // unix timestamp in seconds\n  \"ISO\": \"2024-04-04T13:51:28.600Z\", // ISO8601\n  \"RFC2822\": \"Thu, 04 Apr 2024 13:51:28 GMT\", // RFC2822\n  \"locale\": \"Donnerstag, 4. April 2024 um 15:51:28 Mitteleuropäische Sommerzeit\", // localized time\n  \"location\": {\n    \"latitude\": 53.5544, // latitude\n    \"longitude\": 9.9946, // longitude\n    \"country\": \"DE\", // ISO 3166-1 alpha-2 country code\n    \"countryRegion\": \"HH\", // ISO 3166-2 alpha-2 country code\n    \"city\": \"Hamburg\", // city\n    \"flag\": \"🇩🇪\", // flag emoji\n  },\n}\n```\n\n## \u003ckbd\u003ePOST\u003c/kbd\u003e `https://time.ptr.red/token/sign`\n\nGet a signed date token that can be used to verify the authenticity of the time the token was created in the future.\n\nRequest body:\n\n```jsonc\n{\n  \"id\": \"string\", // unique identifier\n}\n```\n\nResponse body:\n\n```jsonc\n{\n  \"token\": \"ptr::1712239399::cf90e3f8b1290cfb8ff1b1d4127c887582bdf37071f3f39f45748a8e81d6386239b6322e15b2c8e5d4adf99a851bce15d5ba0d5963be388ab6d3cc6bae8b9db0\", // \"id::unix_time::signature\"\n}\n```\n\n## \u003ckbd\u003ePOST\u003c/kbd\u003e `https://time.ptr.red/token/validate`\n\nValidate a signed date token.\n\nRequest body:\n\n```jsonc\n{\n  \"token\": \"ptr::1712239399::cf90e3f8b1290cfb8ff1b1d4127c887582bdf37071f3f39f45748a8e81d6386239b6322e15b2c8e5d4adf99a851bce15d5ba0d5963be388ab6d3cc6bae8b9db0\", // signed date token\n}\n```\n\nResponse body:\n\n```jsonc\n{\n  \"valid\": true, // valid token\n  \"id\": \"ptr\", // unique identifier\n  \"time\": 1712239399, // unix timestamp in seconds\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterfritz%2Ftime","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeterfritz%2Ftime","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterfritz%2Ftime/lists"}