{"id":16384232,"url":"https://github.com/peteroid/avr-datetime","last_synced_at":"2026-05-11T05:30:18.186Z","repository":{"id":67614748,"uuid":"56293450","full_name":"peteroid/avr-datetime","owner":"peteroid","description":"A lightweight DateTime library specializing for AVR development as well as C.","archived":false,"fork":false,"pushed_at":"2016-04-15T05:43:36.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-02T10:30:42.398Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/peteroid.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2016-04-15T05:28:55.000Z","updated_at":"2016-04-15T05:37:13.000Z","dependencies_parsed_at":"2023-03-11T02:04:25.089Z","dependency_job_id":null,"html_url":"https://github.com/peteroid/avr-datetime","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peteroid%2Favr-datetime","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peteroid%2Favr-datetime/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peteroid%2Favr-datetime/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peteroid%2Favr-datetime/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peteroid","download_url":"https://codeload.github.com/peteroid/avr-datetime/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240109567,"owners_count":19749171,"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":[],"created_at":"2024-10-11T04:10:50.500Z","updated_at":"2026-05-11T05:30:18.157Z","avatar_url":"https://github.com/peteroid.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# avr-datetime\nA lightweight DateTime library specializing for AVR development as well as C.\n\n## Getting started\n```c\n#include \"datetime.h\"\n```\n\n## Example\n```c\n#include \u003cstdio.h\u003e\n#include \u003cunistd.h\u003e\n#include \"datetime.h\"\n\nint main() {\n  DateTime d;\n  setDateTime(\u0026d, 2016, 1, 1, 0, 0, 0);\n  while(1) {\n    printf(\"%d/%d/%d\\n%d:%d:%d\\n\",\n    d.year, d.month, d.day, d.hour, d.minute, d.second);\n    sleep(1);\n    tickSecond(\u0026d);\n  }\n\n  return 0;\n}\n```\n\n## API\n- `DateTime d;`: declare a new DateTime variable\n- `unsigned int d.year`: get the year\n- `unsigned int d.month`: get the month\n- `unsigned int d.day`: get the day\n- `unsigned int d.hour`: get the hour\n- `unsigned int d.minute`: get the minute\n- `unsigned int d.day`: get the day\n- `void setDateTime(DateTime* d, int year, int month, int day, int hour, int minute, int second)`: set the time to the desired parameters\n- `void tickSecond(DateTime* d)`: tick 1 second and updat the variable\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeteroid%2Favr-datetime","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeteroid%2Favr-datetime","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeteroid%2Favr-datetime/lists"}