{"id":15694076,"url":"https://github.com/konstruktoid/tymely","last_synced_at":"2026-03-18T02:33:31.932Z","repository":{"id":38216123,"uuid":"300561021","full_name":"konstruktoid/tymely","owner":"konstruktoid","description":"tymely is a application used to set system date and time using HTTP-date.","archived":false,"fork":false,"pushed_at":"2025-06-10T22:03:02.000Z","size":574,"stargazers_count":8,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-10T23:19:44.681Z","etag":null,"topics":["hacktoberfest","https-client","ntp","python-black","python3","timedatectl"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/konstruktoid.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"konstruktoid"}},"created_at":"2020-10-02T09:11:06.000Z","updated_at":"2025-06-03T15:18:32.000Z","dependencies_parsed_at":"2023-10-20T18:26:05.637Z","dependency_job_id":"c8718910-7737-4c7e-bab0-ac49c7cca9b1","html_url":"https://github.com/konstruktoid/tymely","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/konstruktoid/tymely","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/konstruktoid%2Ftymely","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/konstruktoid%2Ftymely/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/konstruktoid%2Ftymely/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/konstruktoid%2Ftymely/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/konstruktoid","download_url":"https://codeload.github.com/konstruktoid/tymely/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/konstruktoid%2Ftymely/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260166293,"owners_count":22968632,"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":["hacktoberfest","https-client","ntp","python-black","python3","timedatectl"],"created_at":"2024-10-03T18:52:03.621Z","updated_at":"2026-03-18T02:33:31.855Z","avatar_url":"https://github.com/konstruktoid.png","language":"Python","funding_links":["https://github.com/sponsors/konstruktoid"],"categories":[],"sub_categories":[],"readme":"# tymely\n\n## T-Y-M-E-L-Y with Y because, why not\n\n[In a timely manner ; at the right time](https://en.wiktionary.org/wiki/tymely)\nand for no apparent reason inspired by\n[Doom Patrol](https://www.imdb.com/title/tt11591458/).\n\n## Description\n\n`tymely` is a simple type [Python](https://www.python.org/) application used to\nset system date and time with `date -s \"%s\"` using the `HTTP-date` fetched from\none or more defined websites over HTTPS.\n\nWritten as a test after a discussion about [security implications when\nusing NTP](https://github.com/konstruktoid/hardening/issues/80).\n\n## System configuration\n\nUninstall `ntpd`, `chrony` and other applications using NTP.\n\nIn order to disable `sntp` functionality in `systemd`, run\n`sudo timedatectl set-ntp 0` and verify with\n`sudo systemctl status systemd-timesyncd.service`.\n\nUse `cron` or systemd timers to execute `tymely`.\n\n## Usage\n\n```sh\nusage: tymely.py [-h] [-c CONFIG] [-t]\n\ntymely fetches HTTP-date over HTTPS and sets the system time\n\noptions:\n  -h, --help            show this help message and exit\n  -c CONFIG, --config CONFIG\n                        specifies a configuration file\n  -t, --test            don't set the system time, just print the date\n\nversion: 0.1.0\n```\n\nIf no configuration file is used,`tymely` will use `https://duckduckgo.com`\nas the site to fetch the `HTTP-date` from, use `tymely/\u003cversion\u003e` as user agent,\nand set the system date to the returned `HTTP-date`.\n\n## Configuration file options\n\nThe configuration file should be in valid `YAML` format.\n\n`verbose: (0|1)` show verbose information.\n\n`sites:` a list of sites to fetch the HTTP-date header from.\n\n`user_agents:` a list of user agents.\n\n### Example configuration\n\n```yaml\n---\nverbose: 1\nsites:\n  - \"cloudflare.com\"\n  - \"duckduckgo.com\"\n  - \"github.com\"\n  - \"proton.me\"\n  - \"stackoverflow.com\"\n  - \"xkcd.com\"\nuser_agents:\n  - \"Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Mobile Safari/537.36\"\n  - \"Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Mobile Safari/537.36\"\n  - \"Mozilla/5.0 (Linux; Android 14; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.6668.71 Mobile Safari/537.36\"\n  - \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36\"\n  - \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Safari/605.1.15\"\n  - \"Mozilla/5.0 (Macintosh; Intel Mac OS X 11.6; rv:92.0) Gecko/20100101 Firefox/92.0\"\n  - \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36\"\n  - \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36\"\n  - \"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36\"\n  - \"Mozilla/5.0 (iPhone; CPU iPhone OS 17_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.6 Mobile/15E148 Safari/604.1\"\n```\n\nThe above configuration will make `tymely` randomly choose a site and user agent\nfrom the lists presented in the file, and verbosely return any information.\n\n```sh\n$ ./tymely.py -c tymely.yaml -t\nVerbose mode enabled\nConfiguration file: tymely.yaml\n{'verbose': 1, 'sites': ['cloudflare.com', 'duckduckgo.com', 'github.com', 'proton.me', 'stackoverflow.com', 'xkcd.com'], 'user_agents': ['Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Mobile Safari/537.36', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Mobile Safari/537.36', 'Mozilla/5.0 (Linux; Android 14; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.6668.71 Mobile Safari/537.36', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Safari/605.1.15', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 11.6; rv:92.0) Gecko/20100101 Firefox/92.0', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36', 'Mozilla/5.0 (iPhone; CPU iPhone OS 17_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.6 Mobile/15E148 Safari/604.1']}\nURL: duckduckgo.com\nUser agent: Mozilla/5.0 (iPhone; CPU iPhone OS 17_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.6 Mobile/15E148 Safari/604.1\nResponse headers: {'Server': 'nginx', 'Date': 'Thu, 10 Oct 2024 19:05:43 GMT', 'Content-Type': 'text/html; charset=UTF-8', 'Content-Length': '11191', 'Connection': 'keep-alive', 'Vary': 'Accept-Encoding', 'ETag': '\"6706e8f7-2bb7\"', 'Content-Encoding': 'gzip', 'Strict-Transport-Security': 'max-age=31536000', 'Permissions-Policy': 'interest-cohort=()', 'Content-Security-Policy': \"default-src 'none' ; connect-src  https://duckduckgo.com https://*.duckduckgo.com https://duckduckgogg42xjoc72x3sjasowoarfbgcmvfimaftt6twagswzczad.onion/ https://spreadprivacy.com ; manifest-src  https://duckduckgo.com https://*.duckduckgo.com https://duckduckgogg42xjoc72x3sjasowoarfbgcmvfimaftt6twagswzczad.onion/ https://spreadprivacy.com ; media-src  https://duckduckgo.com https://*.duckduckgo.com https://duckduckgogg42xjoc72x3sjasowoarfbgcmvfimaftt6twagswzczad.onion/ https://spreadprivacy.com ; script-src blob:  https://duckduckgo.com https://*.duckduckgo.com https://duckduckgogg42xjoc72x3sjasowoarfbgcmvfimaftt6twagswzczad.onion/ https://spreadprivacy.com 'unsafe-inline' 'unsafe-eval' ; font-src data:  https://duckduckgo.com https://*.duckduckgo.com https://duckduckgogg42xjoc72x3sjasowoarfbgcmvfimaftt6twagswzczad.onion/ https://spreadprivacy.com ; img-src data:  https://duckduckgo.com https://*.duckduckgo.com https://duckduckgogg42xjoc72x3sjasowoarfbgcmvfimaftt6twagswzczad.onion/ https://spreadprivacy.com ; style-src  https://duckduckgo.com https://*.duckduckgo.com https://duckduckgogg42xjoc72x3sjasowoarfbgcmvfimaftt6twagswzczad.onion/ https://spreadprivacy.com 'unsafe-inline' ; object-src 'none' ; worker-src blob: ; child-src blob:  https://duckduckgo.com https://*.duckduckgo.com https://duckduckgogg42xjoc72x3sjasowoarfbgcmvfimaftt6twagswzczad.onion/ https://spreadprivacy.com ; frame-src blob:  https://duckduckgo.com https://*.duckduckgo.com https://duckduckgogg42xjoc72x3sjasowoarfbgcmvfimaftt6twagswzczad.onion/ https://spreadprivacy.com ; form-action  https://duckduckgo.com https://*.duckduckgo.com https://duckduckgogg42xjoc72x3sjasowoarfbgcmvfimaftt6twagswzczad.onion/ https://spreadprivacy.com ; frame-ancestors 'self' https://html.duckduckgo.com; base-uri 'self' ; block-all-mixed-content ;\", 'X-Frame-Options': 'SAMEORIGIN', 'X-XSS-Protection': '1;mode=block', 'X-Content-Type-Options': 'nosniff', 'Referrer-Policy': 'origin', 'Expect-CT': 'max-age=0', 'Expires': 'Thu, 10 Oct 2024 19:05:42 GMT', 'Cache-Control': 'no-cache'}\nThu, 10 Oct 2024 19:05:43 GMT from duckduckgo.com returned but not set\n```\n\n### Related documentation\n\n\u003chttps://tools.ietf.org/html/rfc7231#section-7.1.1.2\u003e\n\n\u003chttps://www.whonix.org/wiki/Time_Attacks\u003e\n\n\u003chttps://gitlab.com/madaidan/secure-time-sync\u003e\n\n\u003chttps://github.com/ioerror/tlsdate\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkonstruktoid%2Ftymely","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkonstruktoid%2Ftymely","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkonstruktoid%2Ftymely/lists"}