Issue:
Bug: [FIX] parsing leap seconds



Currently we are facing errors while parsing leap seconds in ISO8601 format, [this commit](https://github.com/time-rs/time/commit/9c15ee34668fc99c918656fb2895b6d0bfdf7d75) fixes it in `time` crate

Pull request description:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] Dependency updates

## Description
<!-- Describe your changes in detail -->
Update the time crate to `0.3.35` version

## Motivation and Context
<!--
Why is this change required? What problem does it solve?
If it fixes an open issue, please link to the issue here.

If you don't have an issue, we'd recommend starting with one first so the PR
can focus on the implementation (unless it is an obvious bug or documentation fix
that will have little conversation).
-->
This version of the time crate fixes a critical bug where `IS8601` breaks while parsing leap seconds


## How did you test it?
<!--
Did you write an integration/unit/API test to verify the code changes?
Or did you test this change manually (provide relevant screenshots)?
-->
Cannot be tested in sandbox

- Ran `cargo test -p common_utils test_leap_second_parse` locally and verify the testcase is running

## Checklist
<!-- Put an `x` in the boxes that apply -->

- [x] I formatted the code `cargo +nightly fmt --all`
- [x] I addressed lints thrown by `cargo clippy`
- [x] I reviewed the submitted code

Testing:

Cannot be tested in sandbox

- Ran `cargo test -p common_utils test_leap_second_parse` locally and verify the testcase is running

Patch:
diff --git a/Cargo.lock b/Cargo.lock
index f17cd059480..92a998dbf57 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -6978,9 +6978,9 @@ dependencies = [
 
 [[package]]
 name = "time"
-version = "0.3.34"
+version = "0.3.35"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749"
+checksum = "ef89ece63debf11bc32d1ed8d078ac870cbeb44da02afb02a9ff135ae7ca0582"
 dependencies = [
  "deranged",
  "itoa",
@@ -7001,9 +7001,9 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3"
 
 [[package]]
 name = "time-macros"
-version = "0.2.17"
+version = "0.2.18"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774"
+checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf"
 dependencies = [
  "num-conv",
  "time-core",
diff --git a/crates/analytics/Cargo.toml b/crates/analytics/Cargo.toml
index 2b1cc798a7e..c3e35519dce 100644
--- a/crates/analytics/Cargo.toml
+++ b/crates/analytics/Cargo.toml
@@ -37,5 +37,5 @@ serde_json = "1.0.115"
 sqlx = { version = "0.7.3", features = ["postgres", "runtime-tokio", "runtime-tokio-native-tls", "time", "bigdecimal"] }
 strum = { version = "0.26.2", features = ["derive"] }
 thiserror = "1.0.58"
-time = { version = "0.3.34", features = ["serde", "serde-well-known", "std"] }
+time = { version = "0.3.35", features = ["serde", "serde-well-known", "std"] }
 tokio = { version = "1.37.0", features = ["macros", "rt-multi-thread"] }
diff --git a/crates/api_models/Cargo.toml b/crates/api_models/Cargo.toml
index cdcee9c506e..0bd0b01a278 100644
--- a/crates/api_models/Cargo.toml
+++ b/crates/api_models/Cargo.toml
@@ -30,7 +30,7 @@ reqwest = { version = "0.11.27", optional = true }
 serde = { version = "1.0.197", features = ["derive"] }
 serde_json = "1.0.115"
 strum = { version = "0.26", features = ["derive"] }
-time = { version = "0.3.34", features = ["serde", "serde-well-known", "std"] }
+time = { version = "0.3.35", features = ["serde", "serde-well-known", "std"] }
 url = { version = "2.5.0", features = ["serde"] }
 utoipa = { version = "4.2.0", features = ["preserve_order", "preserve_path_order"] }
 frunk = "0.4.2"
diff --git a/crates/cards/Cargo.toml b/crates/cards/Cargo.toml
index ab4152893af..ac8a417fb99 100644
--- a/crates/cards/Cargo.toml
+++ b/crates/cards/Cargo.toml
@@ -14,7 +14,7 @@ error-stack = "0.4.1"
 luhn = "1.0.1"
 serde = { version = "1.0.197", features = ["derive"] }
 thiserror = "1.0.58"
-time = "0.3.34"
+time = "0.3.35"
 
 # First party crates
 common_utils = { version = "0.1.0", path = "../common_utils" }
diff --git a/crates/common_utils/Cargo.toml b/crates/common_utils/Cargo.toml
index 285d423958d..6f08649fbda 100644
--- a/crates/common_utils/Cargo.toml
+++ b/crates/common_utils/Cargo.toml
@@ -36,7 +36,7 @@ serde_urlencoded = "0.7.1"
 signal-hook = { version = "0.3.17", optional = true }
 strum = { version = "0.26.2", features = ["derive"] }
 thiserror = "1.0.58"
-time = { version = "0.3.34", features = ["serde", "serde-well-known", "std"] }
+time = { version = "0.3.35", features = ["serde", "serde-well-known", "std"] }
 tokio = { version = "1.37.0", features = ["macros", "rt-multi-thread"], optional = true }
 semver = { version = "1.0.22", features = ["serde"] }
 uuid = { version = "1.8.0", features = ["v7"] }
diff --git a/crates/common_utils/src/custom_serde.rs b/crates/common_utils/src/custom_serde.rs
index e4608c4f371..79e0c5b85e7 100644
--- a/crates/common_utils/src/custom_serde.rs
+++ b/crates/common_utils/src/custom_serde.rs
@@ -265,3 +265,22 @@ pub mod iso8601custom {
         })
     }
 }
+
+#[cfg(test)]
+mod tests {
+    use serde::{Deserialize, Serialize};
+    use serde_json::json;
+
+    #[test]
+    fn test_leap_second_parse() {
+        #[derive(Serialize, Deserialize)]
+        struct Try {
+            #[serde(with = "crate::custom_serde::iso8601")]
+            f: time::PrimitiveDateTime,
+        }
+        let leap_second_date_time = json!({"f": "2023-12-31T23:59:60.000Z"});
+        let deser = serde_json::from_value::<Try>(leap_second_date_time);
+
+        assert!(deser.is_ok())
+    }
+}
diff --git a/crates/common_utils/src/lib.rs b/crates/common_utils/src/lib.rs
index b1a708f7a08..7b8b7bb9490 100644
--- a/crates/common_utils/src/lib.rs
+++ b/crates/common_utils/src/lib.rs
@@ -23,15 +23,15 @@ pub mod validation;
 
 /// Date-time utilities.
 pub mod date_time {
+    #[cfg(feature = "async_ext")]
+    use std::time::Instant;
     use std::{marker::PhantomData, num::NonZeroU8};
 
     use masking::{Deserialize, Serialize};
-    #[cfg(feature = "async_ext")]
-    use time::Instant;
     use time::{
         format_description::{
             well_known::iso8601::{Config, EncodedConfig, Iso8601, TimePrecision},
-            FormatItem,
+            BorrowedFormatItem,
         },
         OffsetDateTime, PrimitiveDateTime,
     };
@@ -68,7 +68,7 @@ pub mod date_time {
     ) -> (T, f64) {
         let start = Instant::now();
         let result = block().await;
-        (result, start.elapsed().as_seconds_f64() * 1000f64)
+        (result, start.elapsed().as_secs_f64() * 1000f64)
     }
 
     /// Return the given date and time in UTC with the given format Eg: format: YYYYMMDDHHmmss Eg: 20191105081132
@@ -76,7 +76,7 @@ pub mod date_time {
         date: PrimitiveDateTime,
         format: DateFormat,
     ) -> Result<String, time::error::Format> {
-        let format = <&[FormatItem<'_>]>::from(format);
+        let format = <&[BorrowedFormatItem<'_>]>::from(format);
         date.format(&format)
     }
 
@@ -90,7 +90,7 @@ pub mod date_time {
         now().assume_utc().format(&Iso8601::<ISO_CONFIG>)
     }
 
-    impl From<DateFormat> for &[FormatItem<'_>] {
+    impl From<DateFormat> for &[BorrowedFormatItem<'_>] {
         fn from(format: DateFormat) -> Self {
             match format {
                 DateFormat::YYYYMMDDHHmmss => time::macros::format_description!("[year repr:full][month padding:zero repr:numerical][day padding:zero][hour padding:zero repr:24][minute padding:zero][second padding:zero]"),
diff --git a/crates/data_models/Cargo.toml b/crates/data_models/Cargo.toml
index 6da89dc2325..54130ca002a 100644
--- a/crates/data_models/Cargo.toml
+++ b/crates/data_models/Cargo.toml
@@ -26,4 +26,4 @@ error-stack = "0.4.1"
 serde = { version = "1.0.197", features = ["derive"] }
 serde_json = "1.0.115"
 thiserror = "1.0.58"
-time = { version = "0.3.34", features = ["serde", "serde-well-known", "std"] }
+time = { version = "0.3.35", features = ["serde", "serde-well-known", "std"] }
diff --git a/crates/diesel_models/Cargo.toml b/crates/diesel_models/Cargo.toml
index 85533d0cf33..577233cdf1a 100644
--- a/crates/diesel_models/Cargo.toml
+++ b/crates/diesel_models/Cargo.toml
@@ -21,7 +21,7 @@ serde = { version = "1.0.197", features = ["derive"] }
 serde_json = "1.0.115"
 strum = { version = "0.26.2", features = ["derive"] }
 thiserror = "1.0.58"
-time = { version = "0.3.34", features = ["serde", "serde-well-known", "std"] }
+time = { version = "0.3.35", features = ["serde", "serde-well-known", "std"] }
 
 # First party crates
 common_enums = { version = "0.1.0", path = "../common_enums" }
diff --git a/crates/router/Cargo.toml b/crates/router/Cargo.toml
index 002e22ec4d8..36999fa0667 100644
--- a/crates/router/Cargo.toml
+++ b/crates/router/Cargo.toml
@@ -87,7 +87,7 @@ sqlx = { version = "0.7.3", features = ["postgres", "runtime-tokio", "runtime-to
 strum = { version = "0.26", features = ["derive"] }
 tera = "1.19.1"
 thiserror = "1.0.58"
-time = { version = "0.3.34", features = ["serde", "serde-well-known", "std"] }
+time = { version = "0.3.35", features = ["serde", "serde-well-known", "std"] }
 tokio = { version = "1.37.0", features = ["macros", "rt-multi-thread"] }
 unicode-segmentation = "1.11.0"
 url = { version = "2.5.0", features = ["serde"] }
@@ -134,7 +134,7 @@ awc = { version = "3.4.0", features = ["rustls"] }
 derive_deref = "1.1.1"
 rand = "0.8.5"
 serial_test = "3.0.0"
-time = { version = "0.3.34", features = ["macros"] }
+time = { version = "0.3.35", features = ["macros"] }
 tokio = "1.37.0"
 wiremock = "0.6.0"
 
diff --git a/crates/router/tests/connectors/ebanx.rs b/crates/router/tests/connectors/ebanx.rs
index 5ef703469ea..0c675be2242 100644
--- a/crates/router/tests/connectors/ebanx.rs
+++ b/crates/router/tests/connectors/ebanx.rs
@@ -306,7 +306,7 @@ async fn should_sync_refund() {
     );
 }
 
-// Cards Negative scenerios
+// Cards Negative scenarios
 // Creates a payment with incorrect CVC.
 #[actix_web::test]
 async fn should_fail_payment_for_incorrect_cvc() {
diff --git a/crates/router_env/Cargo.toml b/crates/router_env/Cargo.toml
index 72f0f0b39ac..3b95d5f22fd 100644
--- a/crates/router_env/Cargo.toml
+++ b/crates/router_env/Cargo.toml
@@ -20,7 +20,7 @@ serde = { version = "1.0.197", features = ["derive"] }
 serde_json = "1.0.115"
 serde_path_to_error = "0.1.16"
 strum = { version = "0.26.2", features = ["derive"] }
-time = { version = "0.3.34", default-features = false, features = ["formatting"] }
+time = { version = "0.3.35", default-features = false, features = ["formatting"] }
 tokio = { version = "1.37.0" }
 tracing = { version = "0.1.40" }
 tracing-actix-web = { version = "0.7.10", features = ["opentelemetry_0_19", "uuid_v7"], optional = true }
diff --git a/crates/scheduler/Cargo.toml b/crates/scheduler/Cargo.toml
index f713b8f2f2b..b98f212d674 100644
--- a/crates/scheduler/Cargo.toml
+++ b/crates/scheduler/Cargo.toml
@@ -23,7 +23,7 @@ serde = "1.0.197"
 serde_json = "1.0.115"
 strum = { version = "0.26.2", features = ["derive"] }
 thiserror = "1.0.58"
-time = { version = "0.3.34", features = ["serde", "serde-well-known", "std"] }
+time = { version = "0.3.35", features = ["serde", "serde-well-known", "std"] }
 tokio = { version = "1.37.0", features = ["macros", "rt-multi-thread"] }
 uuid = { version = "1.8.0", features = ["v4"] }
 
diff --git a/crates/test_utils/Cargo.toml b/crates/test_utils/Cargo.toml
index 714e34f0e95..3b0dfe2b91d 100644
--- a/crates/test_utils/Cargo.toml
+++ b/crates/test_utils/Cargo.toml
@@ -24,7 +24,7 @@ serde_json = "1.0.115"
 serde_urlencoded = "0.7.1"
 serial_test = "3.0.0"
 thirtyfour = "0.31.0"
-time = { version = "0.3.34", features = ["macros"] }
+time = { version = "0.3.35", features = ["macros"] }
 tokio = "1.37.0"
 toml = "0.8.12"