@@ -30,7 +30,7 @@ use std::path::{Path, PathBuf};
3030use std:: process:: { self , Command , Stdio } ;
3131use std:: sync:: OnceLock ;
3232use std:: sync:: atomic:: { AtomicBool , Ordering } ;
33- use std:: time:: { Instant , SystemTime } ;
33+ use std:: time:: Instant ;
3434use std:: { env, str} ;
3535
3636use rustc_ast as ast;
@@ -66,8 +66,6 @@ use rustc_session::{EarlyDiagCtxt, Session, config, filesearch};
6666use rustc_span:: FileName ;
6767use rustc_target:: json:: ToJson ;
6868use rustc_target:: spec:: { Target , TargetTuple } ;
69- use time:: OffsetDateTime ;
70- use time:: macros:: format_description;
7169use tracing:: trace;
7270
7371#[ allow( unused_macros) ]
@@ -1304,13 +1302,10 @@ fn ice_path_with_config(config: Option<&UnstableOptions>) -> &'static Option<Pat
13041302 . or_else( || std:: env:: current_dir( ) . ok( ) )
13051303 . unwrap_or_default( ) ,
13061304 } ;
1307- let now: OffsetDateTime = SystemTime :: now( ) . into( ) ;
1308- let file_now = now
1309- . format(
1310- // Don't use a standard datetime format because Windows doesn't support `:` in paths
1311- & format_description!( "[year]-[month]-[day]T[hour]_[minute]_[second]" ) ,
1312- )
1313- . unwrap_or_default( ) ;
1305+ let now = jiff:: Timestamp :: now( ) ;
1306+ let zdt = now. to_zoned( jiff:: tz:: TimeZone :: system( ) ) ;
1307+ // Don't use a standard datetime format because Windows doesn't support `:` in paths
1308+ let file_now = zdt. strftime( "%Y-%m-%dT%H_%M_%S" ) ;
13141309 let pid = std:: process:: id( ) ;
13151310 path. push( format!( "rustc-ice-{file_now}-{pid}.txt" ) ) ;
13161311 Some ( path)
0 commit comments