This repository was archived by the owner on Sep 9, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -23,21 +23,20 @@ required-features = ["cli"]
2323
2424[features ]
2525cli = [
26- " chrono" ,
2726 " clap" ,
2827 " colored" ,
2928 " dialoguer" ,
3029 " env_logger" ,
3130 " indoc" ,
3231 " pathdiff" ,
3332 " stack-graphs/json" ,
33+ " time" ,
3434 " tree-sitter-config" ,
3535 " walkdir"
3636]
3737
3838[dependencies ]
3939anyhow = " 1.0"
40- chrono = { version = " 0.4" , optional = true }
4140clap = { version = " 3" , optional = true , features =[" derive" ] }
4241colored = { version = " 2.0" , optional = true }
4342controlled-option = " >=0.4"
@@ -53,6 +52,7 @@ regex = "1"
5352rust-ini = " 0.18"
5453stack-graphs = { version =" 0.10" , path =" ../stack-graphs" }
5554thiserror = " 1.0"
55+ time = { version = " 0.3" , optional = true }
5656tree-sitter = " >= 0.19"
5757tree-sitter-config = { version = " 0.19" , optional = true }
5858tree-sitter-graph = " 0.7"
Original file line number Diff line number Diff line change 66// ------------------------------------------------------------------------------------------------
77
88use anyhow:: anyhow;
9- use chrono:: Datelike ;
109use clap:: Args ;
1110use clap:: ValueHint ;
1211use dialoguer:: Input ;
@@ -21,6 +20,7 @@ use std::fs::File;
2120use std:: io:: Write ;
2221use std:: path:: Path ;
2322use std:: path:: PathBuf ;
23+ use time:: OffsetDateTime ;
2424
2525use self :: license:: lookup_license;
2626use self :: license:: DEFAULT_LICENSES ;
@@ -445,7 +445,7 @@ impl ProjectSettings {
445445 NO_LICENSE | OTHER_LICENSE => { }
446446 selected => {
447447 let mut file = File :: create ( project_path. join ( "LICENSE" ) ) ?;
448- let year = chrono :: Utc :: now ( ) . year ( ) ;
448+ let year = OffsetDateTime :: now_utc ( ) . year ( ) ;
449449 let author = self . license_author ( ) ;
450450 ( DEFAULT_LICENSES [ selected] . 2 ) ( & mut file, year, & author) ?;
451451 }
@@ -457,7 +457,7 @@ impl ProjectSettings {
457457 match lookup_license ( & self . license ) {
458458 NO_LICENSE | OTHER_LICENSE => { }
459459 selected => {
460- let year = chrono :: Utc :: now ( ) . year ( ) ;
460+ let year = OffsetDateTime :: now_utc ( ) . year ( ) ;
461461 let author = self . license_author ( ) ;
462462 ( DEFAULT_LICENSES [ selected] . 1 ) ( file, year, & author, prefix) ?;
463463 }
You can’t perform that action at this time.
0 commit comments