@@ -33,6 +33,7 @@ use builder::{Builder, RunConfig, ShouldRun, Step};
33
33
use compile;
34
34
use tool:: { self , Tool } ;
35
35
use cache:: { INTERNER , Interned } ;
36
+ use time;
36
37
37
38
pub fn pkgname ( build : & Build , component : & str ) -> String {
38
39
if component == "cargo" {
@@ -445,8 +446,7 @@ impl Step for Rustc {
445
446
t ! ( fs:: create_dir_all( image. join( "share/man/man1" ) ) ) ;
446
447
let man_src = build. src . join ( "src/doc/man" ) ;
447
448
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( ) ) ) ;
450
450
// don't use our `bootstrap::util::{copy, cp_r}`, because those try
451
451
// to hardlink, and we don't want to edit the source templates
452
452
for entry_result in t ! ( fs:: read_dir( man_src) ) {
@@ -456,7 +456,7 @@ impl Step for Rustc {
456
456
t ! ( fs:: copy( & page_src, & page_dst) ) ;
457
457
// template in month/year and version number
458
458
replace_in_file ( & page_dst,
459
- & [ ( "<INSERT DATE HERE>" , month_year) ,
459
+ & [ ( "<INSERT DATE HERE>" , & month_year) ,
460
460
( "<INSERT VERSION HERE>" , channel:: CFG_RELEASE_NUM ) ] ) ;
461
461
}
462
462
0 commit comments