{"id":16950195,"url":"https://github.com/tailhook/serde-millis","last_synced_at":"2025-03-22T13:31:24.356Z","repository":{"id":57666744,"uuid":"112348787","full_name":"tailhook/serde-millis","owner":"tailhook","description":"    A serde wrapper that stores integer millisecond value for timestamps and durations (used similarly to serde_bytes)","archived":false,"fork":false,"pushed_at":"2020-08-07T15:59:17.000Z","size":19,"stargazers_count":7,"open_issues_count":2,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-05-09T14:46:58.779Z","etag":null,"topics":["milliseconds","rust","serde","serialization","timestamps"],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/tailhook.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-28T14:53:07.000Z","updated_at":"2023-06-01T17:11:40.000Z","dependencies_parsed_at":"2022-09-02T14:22:56.243Z","dependency_job_id":null,"html_url":"https://github.com/tailhook/serde-millis","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tailhook%2Fserde-millis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tailhook%2Fserde-millis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tailhook%2Fserde-millis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tailhook%2Fserde-millis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tailhook","download_url":"https://codeload.github.com/tailhook/serde-millis/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244962817,"owners_count":20539229,"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":["milliseconds","rust","serde","serialization","timestamps"],"created_at":"2024-10-13T21:57:03.795Z","updated_at":"2025-03-22T13:31:23.942Z","avatar_url":"https://github.com/tailhook.png","language":"Rust","readme":"Serde Millis\n============\n\n[Documentation](https://docs.rs/serde_millis) |\n[Github](https://github.com/tailhook/serde-millis) |\n[Crate](https://crates.io/crates/serde_millis)\n\nA serde wrapper, that can be used to serialize timestamps and durations as\nmilliseconds. It's often useful together with `serde_json` to communicate with\nJavascript.\n\nExample\n-------\n\n```rust\n#[macro_use]\nextern crate serde_derive;\n\nextern crate serde;\nextern crate serde_millis;\n\nuse std::time::{Duration, SystemTime, Instant};\n\n#[derive(Serialize, Deserialize)]\nstruct Timestamps {\n    #[serde(with = \"serde_millis\")]\n    time: SystemTime,\n\n    #[serde(with = \"serde_millis\")]\n    latency: Duration,\n\n    // Instant is serialized relative to the current time, or in\n    // other words by formula (but works for future instants too):\n    //\n    //   ts = SystemTime::now() - (Instant::now() - target_instant)\n    //\n    #[serde(with = \"serde_millis\")]\n    timestamp: Instant,\n}\n```\n\n\nLicense\n=======\n\nLicensed under either of\n\n* Apache License, Version 2.0,\n  (./LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)\n* MIT license (./LICENSE-MIT or http://opensource.org/licenses/MIT)\n  at your option.\n\nContribution\n------------\n\nUnless you explicitly state otherwise, any contribution intentionally\nsubmitted for inclusion in the work by you, as defined in the Apache-2.0\nlicense, shall be dual licensed as above, without any additional terms or\nconditions.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftailhook%2Fserde-millis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftailhook%2Fserde-millis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftailhook%2Fserde-millis/lists"}