@@ -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" {
@@ -436,8 +437,7 @@ impl Step for Rustc {
436
437
t ! ( fs:: create_dir_all( image. join( "share/man/man1" ) ) ) ;
437
438
let man_src = build. src . join ( "src/doc/man" ) ;
438
439
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( ) ) ) ;
441
441
// don't use our `bootstrap::util::{copy, cp_r}`, because those try
442
442
// to hardlink, and we don't want to edit the source templates
443
443
for entry_result in t ! ( fs:: read_dir( man_src) ) {
@@ -447,7 +447,7 @@ impl Step for Rustc {
447
447
t ! ( fs:: copy( & page_src, & page_dst) ) ;
448
448
// template in month/year and version number
449
449
replace_in_file ( & page_dst,
450
- & [ ( "<INSERT DATE HERE>" , month_year) ,
450
+ & [ ( "<INSERT DATE HERE>" , & month_year) ,
451
451
( "<INSERT VERSION HERE>" , channel:: CFG_RELEASE_NUM ) ] ) ;
452
452
}
453
453
0 commit comments