{"id":19509583,"url":"https://github.com/raspi/uint64timestamp","last_synced_at":"2025-06-13T23:32:35.195Z","repository":{"id":165536847,"uuid":"640896103","full_name":"raspi/uint64timestamp","owner":"raspi","description":"timestamp fitted into uint64","archived":false,"fork":false,"pushed_at":"2023-05-17T07:30:13.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-25T22:46:32.463Z","etag":null,"topics":["binary","date","datetime","golang","golang-library","library","time","timestamp","uint64"],"latest_commit_sha":null,"homepage":"","language":"Go","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/raspi.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}},"created_at":"2023-05-15T11:01:15.000Z","updated_at":"2023-05-17T07:44:44.000Z","dependencies_parsed_at":"2023-06-09T02:30:39.635Z","dependency_job_id":null,"html_url":"https://github.com/raspi/uint64timestamp","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/raspi/uint64timestamp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raspi%2Fuint64timestamp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raspi%2Fuint64timestamp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raspi%2Fuint64timestamp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raspi%2Fuint64timestamp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/raspi","download_url":"https://codeload.github.com/raspi/uint64timestamp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raspi%2Fuint64timestamp/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259737307,"owners_count":22903832,"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":["binary","date","datetime","golang","golang-library","library","time","timestamp","uint64"],"created_at":"2024-11-10T23:12:33.777Z","updated_at":"2025-06-13T23:32:35.132Z","avatar_url":"https://github.com/raspi.png","language":"Go","readme":"# uint64timestamp\n\n![GitHub All Releases](https://img.shields.io/github/downloads/raspi/uint64timestamp/total?style=for-the-badge)\n![GitHub release (latest by date)](https://img.shields.io/github/v/release/raspi/uint64timestamp?style=for-the-badge)\n![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/raspi/uint64timestamp?style=for-the-badge)\n[![Go Report Card](https://goreportcard.com/badge/github.com/raspi/uint64timestamp)](https://goreportcard.com/report/github.com/raspi/uint64timestamp)\n\nTimestamp fitted into uint64. \nThere are two different versions: Base10 which is for humans and more binary packed Base2. \n\n\n\n|          | Base10                   | Base2                        |\n|----------|--------------------------|------------------------------|\n| Accuracy | microseconds (tens (10)) | nanoseconds (hundreds (100)) |\n\n\n\n## Base10 - human parsable\n\nSee [pkg/base10](pkg/base10) for details.\n\nExample:\n`2023051514142573247` is 2023-05-15 14:14:25.73247\n\n```go\nnow := time.Now()\n\nbin, err := base10.TimeToUint64(now)\nif err != nil {\n    panic(err)\n}\n\nhumanTime, err := base10.Uint64ToTime(bin, now.Location())\nif err != nil {\n    panic(err)\n}\n```\n\n\n## Base2 - binary\n\nSee [pkg/base2](pkg/base2) for details.\n\nExample:\n`2278081318148840948` is 2023-05-15 14:14:25.732479\n\n```go\nnow := time.Now()\n\nbin, err := base2.TimeToUint64(now)\nif err != nil {\n    panic(err)\n}\n\nbinTime, err := base2.Uint64ToTime(bin, now.Location())\nif err != nil {\n    panic(err)\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraspi%2Fuint64timestamp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraspi%2Fuint64timestamp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraspi%2Fuint64timestamp/lists"}