Closed tiamunley closed 2 years ago
Fixed type errors in chrono-english by switching from time::Duration to chrono::Duration type
stderr: error[E0308]: mismatched types --> fbcode/buck-out/dev/cells/fbsource/bin/aab7ed39/third-party/rust/chrono-english#platform009-clang,rlib-pic/third-party/rust/vendor/chrono-english-0.1.6/src/types.rs:54:29 | 54 | base.checked_add_signed(Duration::days(days)) | ^^^^^^^^^^^^^^^^^^^^ expected struct `chrono::Duration`, found struct `time::Duration` error[E0308]: mismatched types --> fbcode/buck-out/dev/cells/fbsource/bin/aab7ed39/third-party/rust/chrono-english#platform009-clang,rlib-pic/third-party/rust/vendor/chrono-english-0.1.6/src/types.rs:193:21 | 193 | Duration::seconds((secs as i64)*(self.skip as i64)) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `chrono::Duration`, found struct `time::Duration` error[E0308]: mismatched types --> fbcode/buck-out/dev/cells/fbsource/bin/aab7ed39/third-party/rust/chrono-english#platform009-clang,rlib-pic/third-party/rust/vendor/chrono-english-0.1.6/src/types.rs:199:21 | 199 | Duration::seconds((secs as i64)*(self.skip as i64)) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `chrono::Duration`, found struct `time::Duration` error: aborting due to 3 previous errors
Output: Fri Apr 1 00:00:00 2022 +0000 Output: 2022-04-01T00:00:00+00:00 Output: 1648771200 Timestamp: 1648771200
I think all these changes have been separately committed.
Yes, thanks
Fixed type errors in chrono-english by switching from time::Duration to chrono::Duration type
Error message before this patch:
Example script after this patch: