@@ -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" {
@@ -436,8 +437,7 @@ impl Step for Rustc {
436437 t ! ( fs:: create_dir_all( image. join( "share/man/man1" ) ) ) ;
437438 let man_src = build. src . join ( "src/doc/man" ) ;
438439 let man_dst = image. join ( "share/man/man1" ) ;
439- let date_output = output ( Command :: new ( "date" ) . arg ( "+%B %Y" ) ) ;
440- let month_year = date_output. trim ( ) ;
440+ let month_year = t ! ( time:: strftime( "%B %Y" , & time:: now( ) ) ) ;
441441 // don't use our `bootstrap::util::{copy, cp_r}`, because those try
442442 // to hardlink, and we don't want to edit the source templates
443443 for entry_result in t ! ( fs:: read_dir( man_src) ) {
@@ -447,7 +447,7 @@ impl Step for Rustc {
447447 t ! ( fs:: copy( & page_src, & page_dst) ) ;
448448 // template in month/year and version number
449449 replace_in_file ( & page_dst,
450- & [ ( "<INSERT DATE HERE>" , month_year) ,
450+ & [ ( "<INSERT DATE HERE>" , & month_year) ,
451451 ( "<INSERT VERSION HERE>" , channel:: CFG_RELEASE_NUM ) ] ) ;
452452 }
453453
0 commit comments