File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ module main
33import os
44import v.util.version
55import v.util.recompilation
6+ import time
67
78const vexe = os.real_path (os.getenv_opt ('VEXE' ) or { @VEXE })
89
@@ -134,9 +135,14 @@ fn (app App) show_current_v_version() {
134135 mut vversion := vout.output.trim_space ()
135136 if vout.exit_code == 0 {
136137 latest_v_commit := vversion.split (' ' ).last ().all_after ('.' )
137- latest_v_commit_time := os.execute ('git show -s --format=%c i ${latest_v_commit} ' )
138+ latest_v_commit_time := os.execute ('git show -s --format=%c I ${latest_v_commit} ' )
138139 if latest_v_commit_time.exit_code == 0 {
139- vversion + = ', timestamp: ' + latest_v_commit_time.output.trim_space ()
140+ parsed_time := if t := time.parse_iso8601 (latest_v_commit_time.output.trim_space ()) {
141+ t.as_utc ().utc_to_local ().custom_format ('YYYY-MM-DD HH:mm:ss ZZ' )
142+ } else {
143+ latest_v_commit_time.output.trim_space ()
144+ }
145+ vversion + = ', timestamp: ' + parsed_time
140146 }
141147 }
142148 println ('Current V version: ${vversion} ' )
You can’t perform that action at this time.
0 commit comments