@@ -33,6 +33,7 @@ use builder::{Builder, RunConfig, ShouldRun, Step};
3333use  compile; 
3434use  tool:: { self ,  Tool } ; 
3535use  cache:: { INTERNER ,  Interned } ; 
36+ use  time; 
3637
3738pub  fn  pkgname ( build :  & Build ,  component :  & str )  -> String  { 
3839    if  component == "cargo"  { 
@@ -445,8 +446,7 @@ impl Step for Rustc {
445446            t ! ( fs:: create_dir_all( image. join( "share/man/man1" ) ) ) ; 
446447            let  man_src = build. src . join ( "src/doc/man" ) ; 
447448            let  man_dst = image. join ( "share/man/man1" ) ; 
448-             let  date_output = output ( Command :: new ( "date" ) . arg ( "+%B %Y" ) ) ; 
449-             let  month_year = date_output. trim ( ) ; 
449+             let  month_year = t ! ( time:: strftime( "%B %Y" ,  & time:: now( ) ) ) ; 
450450            // don't use our `bootstrap::util::{copy, cp_r}`, because those try 
451451            // to hardlink, and we don't want to edit the source templates 
452452            for  entry_result in  t ! ( fs:: read_dir( man_src) )  { 
@@ -456,7 +456,7 @@ impl Step for Rustc {
456456                t ! ( fs:: copy( & page_src,  & page_dst) ) ; 
457457                // template in month/year and version number 
458458                replace_in_file ( & page_dst, 
459-                                 & [ ( "<INSERT DATE HERE>" ,  month_year) , 
459+                                 & [ ( "<INSERT DATE HERE>" ,  & month_year) , 
460460                                  ( "<INSERT VERSION HERE>" ,  channel:: CFG_RELEASE_NUM ) ] ) ; 
461461            } 
462462
0 commit comments