Correct month

This commit is contained in:
Denis Merigoux 2020-05-17 19:20:03 +02:00
parent e071fbd40f
commit 9fa20a160f
2 changed files with 4 additions and 4 deletions

View File

@ -71,8 +71,8 @@ let wrap_html (code : string) (source_files : string list) (custom_pygments : st
let mtime = (Unix.stat filename).Unix.st_mtime in
let ltime = Unix.localtime mtime in
let ftime =
Printf.sprintf "%d-%02d-%02d, %d:%02d" (1900 + ltime.Unix.tm_year) ltime.Unix.tm_mon
ltime.Unix.tm_mday ltime.Unix.tm_hour ltime.Unix.tm_min
Printf.sprintf "%d-%02d-%02d, %d:%02d" (1900 + ltime.Unix.tm_year)
(ltime.Unix.tm_mon + 1) ltime.Unix.tm_mday ltime.Unix.tm_hour ltime.Unix.tm_min
in
Printf.sprintf "<li><tt>%s</tt>, %s %s</li>"
(pre_html (Filename.basename filename))

View File

@ -94,8 +94,8 @@ let wrap_latex (code : string) (source_files : string list) (custom_pygments : s
let mtime = (Unix.stat filename).Unix.st_mtime in
let ltime = Unix.localtime mtime in
let ftime =
Printf.sprintf "%d-%02d-%02d, %d:%02d" (1900 + ltime.Unix.tm_year) ltime.Unix.tm_mon
ltime.Unix.tm_mday ltime.Unix.tm_hour ltime.Unix.tm_min
Printf.sprintf "%d-%02d-%02d, %d:%02d" (1900 + ltime.Unix.tm_year)
(ltime.Unix.tm_mon + 1) ltime.Unix.tm_mday ltime.Unix.tm_hour ltime.Unix.tm_min
in
Printf.sprintf "\\item\\texttt{%s}, %s %s"
(pre_latexify (Filename.basename filename))