feat: add --timezone CLI option for configurable output timezone

This commit is contained in:
2026-05-18 14:51:05 +02:00
parent 37ecfd6130
commit 527669227b
3 changed files with 26 additions and 12 deletions

View File

@@ -5,12 +5,16 @@ let files =
let doc = "Files to process" in
Arg.(non_empty & pos_all string [] & info [] ~docv:"FILE" ~doc)
let timezone =
let doc = "Target timezone for output (e.g. Europe/Rome). Defaults to local timezone." in
Arg.(value & opt (some string) None & info [ "timezone"; "z" ] ~docv:"TZ" ~doc)
let main_command f =
let doc = "Convert iCalendar files to remind format" in
let man = [] in
Cmd.make (Cmd.info "ical2rem" ~version:"%%VERSION%%" ~doc ~man)
@@
let+ files = files in
f files
let+ files = files and+ tz = timezone in
f tz files
let main f = Cmd.eval @@ main_command f