{"id":42012689,"url":"https://github.com/fillin-inc/timeins","last_synced_at":"2026-01-26T02:44:03.963Z","repository":{"id":46998158,"uuid":"97601559","full_name":"fillin-inc/timeins","owner":"fillin-inc","description":"timeins package has been developed to return time up to seconds with the JSON API using Go.","archived":false,"fork":false,"pushed_at":"2025-06-28T22:52:58.000Z","size":12,"stargazers_count":0,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-28T23:28:25.738Z","etag":null,"topics":["go","json"],"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/fillin-inc.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":"2017-07-18T13:28:53.000Z","updated_at":"2024-08-28T14:10:46.000Z","dependencies_parsed_at":"2025-06-28T23:35:24.888Z","dependency_job_id":null,"html_url":"https://github.com/fillin-inc/timeins","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/fillin-inc/timeins","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fillin-inc%2Ftimeins","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fillin-inc%2Ftimeins/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fillin-inc%2Ftimeins/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fillin-inc%2Ftimeins/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fillin-inc","download_url":"https://codeload.github.com/fillin-inc/timeins/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fillin-inc%2Ftimeins/sbom","scorecard":{"id":399747,"data":{"date":"2025-08-11","repo":{"name":"github.com/fillin-inc/timeins","commit":"ef961638eff5ae5b67a567fb7bb6a18a48934abc"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.9,"checks":[{"name":"Maintained","score":10,"reason":"22 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/9 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":"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":"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":"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.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":"Pinned-Dependencies","score":1,"reason":"dependency not pinned by hash detected -- score normalized to 1","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/fillin-inc/timeins/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:44: update your workflow using https://app.stepsecurity.io/secureworkflow/fillin-inc/timeins/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:50: update your workflow using https://app.stepsecurity.io/secureworkflow/fillin-inc/timeins/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:51: update your workflow using https://app.stepsecurity.io/secureworkflow/fillin-inc/timeins/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/fillin-inc/timeins/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/fillin-inc/timeins/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/fillin-inc/timeins/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/fillin-inc/timeins/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/fillin-inc/timeins/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/fillin-inc/timeins/ci.yml/main?enable=pin","Warn: containerImage not pinned by hash: Dockerfile:5","Warn: containerImage not pinned by hash: Dockerfile:28","Warn: containerImage not pinned by hash: Dockerfile:45","Info:   0 out of   8 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned","Info:   0 out of   3 containerImage dependencies pinned","Info:   1 out of   1 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":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"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":"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"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 29 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"}}]},"last_synced_at":"2025-08-18T19:49:49.800Z","repository_id":46998158,"created_at":"2025-08-18T19:49:49.800Z","updated_at":"2025-08-18T19:49:49.800Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28765343,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T02:25:41.078Z","status":"ssl_error","status_checked_at":"2026-01-26T02:24:28.809Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["go","json"],"created_at":"2026-01-26T02:44:03.176Z","updated_at":"2026-01-26T02:44:03.958Z","avatar_url":"https://github.com/fillin-inc.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# timeins - Time in Seconds Package\n\n[![CI](https://github.com/fillin-inc/timeins/actions/workflows/ci.yml/badge.svg)](https://github.com/fillin-inc/timeins/actions/workflows/ci.yml)\n[![Go Reference](https://pkg.go.dev/badge/github.com/fillin-inc/timeins.svg)](https://pkg.go.dev/github.com/fillin-inc/timeins)\n\n`timeins` is a Go package that provides JSON serialization for time with second precision.\n\nWhen using the standard `time.Time` type in JSON responses, timestamps are serialized with nanosecond precision. The `timeins.Time` type formats JSON output to second precision using the ISO8601 format `2006-01-02T15:04:05-07:00`.\n\n## Installation\n\n```bash\ngo get github.com/fillin-inc/timeins\n```\n\n## Requirements\n\n- Go 1.21 or later\n\n## Usage\n\n### Basic Example\n\n```go\npackage main\n\nimport (\n  \"encoding/json\"\n  \"fmt\"\n  \"log\"\n  \"time\"\n\n  \"github.com/fillin-inc/timeins\"\n)\n\ntype Response struct {\n  CreatedAt  timeins.Time `json:\"created_at\"`\n  UpdatedAt  timeins.Time `json:\"updated_at\"`\n}\n\nfunc main() {\n  r := Response{\n    CreatedAt: timeins.Time(time.Now()),\n    UpdatedAt: timeins.Time(time.Now().Add(time.Hour)),\n  }\n\n  // Marshal to JSON\n  data, err := json.Marshal(r)\n  if err != nil {\n    log.Fatal(err)\n  }\n  fmt.Println(string(data))\n  // Output: {\"created_at\":\"2023-07-15T14:30:45+09:00\",\"updated_at\":\"2023-07-15T15:30:45+09:00\"}\n\n  // Unmarshal from JSON\n  var result Response\n  err = json.Unmarshal(data, \u0026result)\n  if err != nil {\n    log.Fatal(err)\n  }\n  fmt.Printf(\"Created: %s\\n\", result.CreatedAt.String())\n}\n```\n\n### Parsing Time Strings\n\n```go\npackage main\n\nimport (\n  \"fmt\"\n  \"log\"\n\n  \"github.com/fillin-inc/timeins\"\n)\n\nfunc main() {\n  // Parse ISO8601 time string\n  t, err := timeins.Parse(\"2023-07-15T14:30:45+09:00\")\n  if err != nil {\n    log.Fatal(err)\n  }\n  fmt.Println(t.String()) // 2023-07-15T14:30:45+09:00\n}\n```\n\n### Error Handling\n\nThe package provides proper error handling for invalid time formats:\n\n```go\npackage main\n\nimport (\n  \"fmt\"\n  \"log\"\n\n  \"github.com/fillin-inc/timeins\"\n)\n\nfunc main() {\n  // This will return an error\n  _, err := timeins.Parse(\"invalid-date\")\n  if err != nil {\n    fmt.Printf(\"Parse error: %v\\n\", err)\n  }\n\n  // JSON unmarshaling also handles errors\n  var t timeins.Time\n  err = t.UnmarshalJSON([]byte(`\"invalid-date\"`))\n  if err != nil {\n    fmt.Printf(\"Unmarshal error: %v\\n\", err)\n  }\n}\n```\n\n## Features\n\n- **Second Precision**: Formats timestamps to second precision, removing nanosecond noise\n- **ISO8601 Compatible**: Uses standard `2006-01-02T15:04:05-07:00` format\n- **Drop-in Replacement**: Wraps `time.Time` while preserving all standard functionality\n- **Comprehensive Error Handling**: Proper error handling for invalid time formats\n- **High Performance**: Optimized JSON marshaling with minimal allocations\n- **100% Test Coverage**: Thoroughly tested with comprehensive test suite\n## Development\n\n### Prerequisites\n\n- Go 1.21 or later\n- Make (optional, for convenience commands)\n\n### Commands\n\n```bash\n# Run tests with coverage\nmake test\n\n# Run linter\nmake lint\n\n# Run benchmarks\nmake benchmark\n\n# Run all checks\nmake test \u0026\u0026 make lint\n```\n\n### Docker Development\n\nThis project includes Docker support for consistent development environments:\n\n```bash\n# Build Docker image\nmake docker-build\n\n# Run tests in container\nmake docker-test\n\n# Run linter in container\nmake docker-lint\n\n# Run benchmarks in container\nmake docker-benchmark\n\n# Interactive development\nmake docker-dev\n```\n\n### Code Style\n\nThis project uses `.editorconfig` to maintain consistent coding styles across different editors and IDEs. Most modern editors support EditorConfig automatically or through plugins.\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feature/amazing-feature`)\n3. Make your changes\n4. Run tests and linter (`make test \u0026\u0026 make lint`)\n5. Commit your changes (`git commit -am 'Add amazing feature'`)\n6. Push to the branch (`git push origin feature/amazing-feature`)\n7. Open a Pull Request\n\n## License\n\nMIT License. See [LICENSE](https://github.com/fillin-inc/timeins/blob/master/LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffillin-inc%2Ftimeins","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffillin-inc%2Ftimeins","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffillin-inc%2Ftimeins/lists"}