Skip to content

Commit 1388ebf

Browse files
committed
[features #???] WIP local time
1 parent 72050ef commit 1388ebf

File tree

4 files changed

+16
-0
lines changed

4 files changed

+16
-0
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

git-features/Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ progress = ["prodash"]
1717
parallel = ["crossbeam-utils", "crossbeam-channel", "num_cpus", "jwalk"]
1818
fast-sha1 = ["sha-1"]
1919
io-pipe = ["bytes"]
20+
time = ["libc"]
2021
crc32 = ["crc32fast"]
2122
zlib = ["flate2", "flate2/rust_backend", "quick-error"]
2223
zlib-ng-compat = ["flate2/zlib-ng-compat"]
@@ -74,6 +75,9 @@ bytes = { version = "1.0.0", optional = true }
7475
flate2 = { version = "1.0.17", optional = true, default-features = false }
7576
quick-error = { version = "2.0.0", optional = true }
7677

78+
# time module
79+
libc = { version = "0.2.101", optional = true }
80+
7781
[package.metadata.docs.rs]
7882
all-features = true
7983

git-features/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,7 @@ pub mod progress;
2222
///
2323
#[cfg(feature = "zlib")]
2424
pub mod zlib;
25+
26+
///
27+
#[cfg(feature = "time")]
28+
pub mod time;

git-features/src/time.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
pub struct Local {
2+
seconds_since_epoch: i64,
3+
tz_offset_in_seconds: i64,
4+
}
5+
pub fn local_since_epoch() -> Local {
6+
todo!("implement localtime")
7+
}

0 commit comments

Comments
 (0)