Skip to content

Commit

Permalink
Update deprecated function from_utc to avoid build errors
Browse files Browse the repository at this point in the history
Update deprecated function `from_utc` to avoid build errors

Signed-off-by: Daniel Martinez Maqueda <[email protected]>
  • Loading branch information
Daniel Martinez Maqueda committed Sep 27, 2023
1 parent b6218a7 commit 7ddfca9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/common/logger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ impl EnclaveProcLogWriter {
/// Generate a single message string.
fn create_msg(&self, now: &DateTime<Local>, record: &Record) -> NitroCliResult<String> {
// UTC timestamp according to RFC 2822
let timestamp = DateTime::<Utc>::from_utc(now.naive_utc(), Utc)
let timestamp = DateTime::<Utc>::from_naive_utc_and_offset(now.naive_utc(), Utc)
.to_rfc3339_opts(chrono::SecondsFormat::Millis, true);
let logger_id = self.logger_id.lock().map_err(|e| {
new_nitro_cli_failure!(
Expand Down

0 comments on commit 7ddfca9

Please sign in to comment.