{"id":13813806,"url":"https://github.com/phuslu/fasttime","last_synced_at":"2026-02-07T03:04:08.459Z","repository":{"id":56739674,"uuid":"322338337","full_name":"phuslu/fasttime","owner":"phuslu","description":"Fastest time format for go","archived":false,"fork":false,"pushed_at":"2022-09-23T05:00:32.000Z","size":24,"stargazers_count":73,"open_issues_count":1,"forks_count":3,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-05-15T01:37:07.238Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","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/phuslu.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}},"created_at":"2020-12-17T15:38:20.000Z","updated_at":"2024-12-03T12:58:58.000Z","dependencies_parsed_at":"2023-01-18T20:01:37.982Z","dependency_job_id":null,"html_url":"https://github.com/phuslu/fasttime","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/phuslu/fasttime","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phuslu%2Ffasttime","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phuslu%2Ffasttime/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phuslu%2Ffasttime/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phuslu%2Ffasttime/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phuslu","download_url":"https://codeload.github.com/phuslu/fasttime/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phuslu%2Ffasttime/sbom","scorecard":{"id":732762,"data":{"date":"2025-08-11","repo":{"name":"github.com/phuslu/fasttime","commit":"5d2db776fc12985eefaf99b70bb648c7b302a2f0"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 1/27 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/benchmark.yml:1","Warn: no topLevel permission defined: .github/workflows/build.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/benchmark.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/phuslu/fasttime/benchmark.yml/master?enable=pin","Warn: goCommand not pinned by hash: .github/workflows/benchmark.yml:26","Warn: goCommand not pinned by hash: .github/workflows/benchmark.yml:27","Info:   0 out of   1 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 goCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 1 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-22T14:53:53.191Z","repository_id":56739674,"created_at":"2025-08-22T14:53:53.192Z","updated_at":"2025-08-22T14:53:53.192Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29185120,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T00:44:15.062Z","status":"online","status_checked_at":"2026-02-07T02:00:07.217Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-08-04T04:01:31.211Z","updated_at":"2026-02-07T03:04:08.441Z","avatar_url":"https://github.com/phuslu.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# fasttime - fast time formatting for go\n\n[![godoc][godoc-img]][godoc] [![release][release-img]][release] [![goreport][goreport-img]][goreport] [![coverage][coverage-img]][coverage]\n\n## Getting Started\n\ntry on https://go.dev/play/p/wnb6G181qu6\n```go\npackage main\n\nimport (\n\t\"time\"\n\n\t\"github.com/phuslu/fasttime\"\n)\n\nfunc main() {\n\tprintln(fasttime.Strftime(\"%a %b %d %H:%M:%S %Z %Y\", time.Now()))\n}\n\n// Thu Dec 17 10:49:04 +08 2020\n```\n\n## Benchmarks\n\n```go\n// go test -v -cpu=4 -run=none -bench=. -benchmem strftime_test.go\npackage strftime_test\n\nimport (\n\t\"io\"\n\t\"testing\"\n\t\"time\"\n\n\titchyny \"github.com/itchyny/timefmt-go\"\n\tlestrrat \"github.com/lestrrat-go/strftime\"\n\tfasttime \"github.com/phuslu/fasttime\"\n)\n\nvar now = time.Now()\n\nfunc BenchmarkUnixDateStdTime(b *testing.B) {\n\tfor i := 0; i \u003c b.N; i++ {\n\t\tnow.Format(time.UnixDate)\n\t}\n}\n\nfunc BenchmarkUnixDateLestrrat(b *testing.B) {\n\tp, _ := lestrrat.New(\"%a %b %e %H:%M:%S %Z %Y\")\n\tfor i := 0; i \u003c b.N; i++ {\n\t\tp.Format(io.Discard, now)\n\t}\n}\n\nfunc BenchmarkUnixDateItchyny(b *testing.B) {\n\tfor i := 0; i \u003c b.N; i++ {\n\t\titchyny.Format(now, \"%a %b %e %H:%M:%S %Z %Y\")\n\t}\n}\n\nfunc BenchmarkUnixDateFasttime(b *testing.B) {\n\tfor i := 0; i \u003c b.N; i++ {\n\t\tfasttime.Strftime(\"%a %b %e %H:%M:%S %Z %Y\", now)\n\t}\n}\n\nfunc BenchmarkStampMicroStdTime(b *testing.B) {\n\tfor i := 0; i \u003c b.N; i++ {\n\t\tnow.Format(time.StampMicro)\n\t}\n}\n\nfunc BenchmarkStampMicroLestrrat(b *testing.B) {\n\tp, _ := lestrrat.New(\"%b %e %H:%M:%S.%f\", lestrrat.WithMicroseconds('f'))\n\tfor i := 0; i \u003c b.N; i++ {\n\t\tp.Format(io.Discard, now)\n\t}\n}\n\nfunc BenchmarkStampMicroItchyny(b *testing.B) {\n\tfor i := 0; i \u003c b.N; i++ {\n\t\titchyny.Format(now, \"%b %e %H:%M:%S.%f\")\n\t}\n}\n\nfunc BenchmarkStampMicroFasttime(b *testing.B) {\n\tfor i := 0; i \u003c b.N; i++ {\n\t\tfasttime.Strftime(\"%b %e %H:%M:%S.%f\", now)\n\t}\n}\n\nfunc BenchmarkRFC3339StdTime(b *testing.B) {\n\tfor i := 0; i \u003c b.N; i++ {\n\t\tnow.Format(time.RFC3339)\n\t}\n}\n\nfunc BenchmarkRFC3339Lestrrat(b *testing.B) {\n\tp, _ := lestrrat.New(\"%Y-%m-%dT%H:%M:%S%z\")\n\tfor i := 0; i \u003c b.N; i++ {\n\t\tp.Format(io.Discard, now)\n\t}\n}\n\nfunc BenchmarkRFC3339Itchyny(b *testing.B) {\n\tfor i := 0; i \u003c b.N; i++ {\n\t\titchyny.Format(now, \"%Y-%m-%dT%H:%M:%S%:z\")\n\t}\n}\n\nfunc BenchmarkRFC3339Fasttime(b *testing.B) {\n\tfor i := 0; i \u003c b.N; i++ {\n\t\tfasttime.Strftime(\"%Y-%m-%dT%H:%M:%S%:z\", now)\n\t}\n}\n```\nA Performance result as below, for daily benchmark results see [github actions][benchmark]\n```\nBenchmarkUnixDateStdTime-4      \t 3134547\t       359.0 ns/op\t      32 B/op\t       1 allocs/op\nBenchmarkUnixDateLestrrat-4     \t 2445044\t       505.8 ns/op\t      64 B/op\t       1 allocs/op\nBenchmarkUnixDateItchyny-4      \t 3726554\t       316.0 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkUnixDateFasttime-4     \t 4719768\t       245.8 ns/op\t       0 B/op\t       0 allocs/op\n\nBenchmarkStampMicroStdTime-4    \t 3793047\t       318.8 ns/op\t      24 B/op\t       1 allocs/op\nBenchmarkStampMicroLestrrat-4   \t 2409372\t       477.2 ns/op\t      72 B/op\t       2 allocs/op\nBenchmarkStampMicroItchyny-4    \t 4752626\t       242.8 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkStampMicroFasttime-4   \t 7268750\t       164.2 ns/op\t       0 B/op\t       0 allocs/op\n\nBenchmarkRFC3339StdTime-4       \t 3563881\t       336.0 ns/op\t      24 B/op\t       1 allocs/op\nBenchmarkRFC3339Lestrrat-4      \t 2520579\t       480.9 ns/op\t      64 B/op\t       1 allocs/op\nBenchmarkRFC3339Itchyny-4       \t 4386028\t       273.3 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkRFC3339Fasttime-4      \t 6393230\t       189.1 ns/op\t       0 B/op\t       0 allocs/op\n```\n\n## Supported formats:\n\n| code | Description |\n| ---- | --- |\n| `%a` | The abbreviated name of the day of the week according to the current locale. |\n| `%A` | The full name of the day of the week according to the current locale. |\n| `%b` | The abbreviated month name according to the current locale. |\n| `%B` | The full month name according to the current locale. |\n| `%c` | The preferred date and time representation for the current locale. |\n| `%C` | The century number (year/100) as a 2-digit integer. |\n| `%d` | The day of the month as a decimal number (range 01 to 31). |\n| `%D` | Equivalent to %m/%d/%y.  (Yecch—for Americans only.) |\n| `%e` | Like %d, the day of the month as a decimal number, but a leading zero is replaced by a space. |\n| `%f` | Microsecond as a decimal number, zero-padded on the left. |\n| `%F` | Equivalent to %Y-%m-%d (the ISO 8601 date format). |\n| `%G` | The  ISO 8601 week-based year (see NOTES) with century as a decimal number.  The 4-digit year corresponding to the ISO week number (see %V).  This has the same format and value as %Y, except that if the ISO week number belongs to the previous or next year, that year is used instead. |\n| `%g` | Like %G, but without century, that is, with a 2-digit year (00-99). |\n| `%h` | Equivalent to %b. |\n| `%H` | The hour as a decimal number using a 24-hour clock (range 00 to 23). |\n| `%I` | The hour as a decimal number using a 12-hour clock (range 01 to 12). |\n| `%j` | The day of the year as a decimal number (range 001 to 366). |\n| `%k` | The hour (24-hour clock) as a decimal number (range 0 to 23); single digits are preceded by a blank.  (See also %H.)  |\n| `%l` | The hour (12-hour clock) as a decimal number (range 1 to 12); single digits are preceded by a blank.  (See also %I.)  |\n| `%m` | The month as a decimal number (range 01 to 12). |\n| `%M` | The minute as a decimal number (range 00 to 59). |\n| `%n` | A newline character. |\n| `%N` | Nanosecond as a decimal number, zero-padded on the left. |\n| `%p` | Either \"AM\" or \"PM\" according to the given time value, or the corresponding strings for the current locale.  Noon is treated as \"PM\" and midnight as \"AM\". |\n| `%P` | Like %p but in lowercase: \"am\" or \"pm\" or a corresponding string for the current locale. |\n| `%Q` | Millisecond as a decimal number, zero-padded on the left. |\n| `%r` | The time in a.m. or p.m. notation.  In the POSIX locale this is equivalent to %I:%M:%S %p. |\n| `%R` | The time in 24-hour notation (%H:%M). For a version including the seconds, see %T below. |\n| `%s` | The number of seconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC). |\n| `%S` | The second as a decimal number (range 00 to 60).  (The range is up to 60 to allow for occasional leap seconds.) |\n| `%t` | A tab character. |\n| `%T` | The time in 24-hour notation (%H:%M:%S). |\n| `%u` | The day of the week as a decimal, range 1 to 7, Monday being 1.  See also %w. |\n| `%U` | The week number of the current year as a decimal number, range 00 to 53, starting with the first Sunday as the first day of week 01.  See also %V and %W. |\n| `%v` | Equivalent to %e-%b-%Y. |\n| `%V` | The ISO 8601 week number (see NOTES) of the current year as a decimal number, range 01 to 53, where week 1 is the first week that has at least 4 days in the new year.  See also %U and %W. |\n| `%w` | The day of the week as a decimal, range 0 to 6, Sunday being 0.  See also %u. |\n| `%W` | The week number of the current year as a decimal number, range 00 to 53, starting with the first Monday as the first day of week 01. |\n| `%x` | The preferred date representation for the current locale without the time. |\n| `%X` | The preferred time representation for the current locale without the date. |\n| `%y` | The year as a decimal number without a century (range 00 to 99). |\n| `%Y` | The year as a decimal number including the century. |\n| `%z` | The +hhmm or -hhmm numeric timezone (that is, the hour and minute offset from UTC). |\n| `%Z` | The timezone name or abbreviation. |\n| `%+` | The date and time in date(1) format. |\n| `%%` | A literal '%' character. |\n\n[godoc-img]: http://img.shields.io/badge/godoc-reference-blue.svg\n[godoc]: https://godoc.org/github.com/phuslu/fasttime\n[release-img]: https://img.shields.io/github/v/tag/phuslu/fasttime?label=release\n[release]: https://github.com/phuslu/fasttime/releases\n[goreport-img]: https://goreportcard.com/badge/github.com/phuslu/fasttime\n[goreport]: https://goreportcard.com/report/github.com/phuslu/fasttime\n[coverage-img]: http://gocover.io/_badge/github.com/phuslu/fasttime\n[coverage]: https://gocover.io/github.com/phuslu/fasttime\n[benchmark]: https://github.com/phuslu/fasttime/actions/workflows/benchmark.yml?query=workflow%3Abenchmark\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphuslu%2Ffasttime","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphuslu%2Ffasttime","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphuslu%2Ffasttime/lists"}