diff --git a/lib/Subtitle/BASE.pm b/lib/Subtitle/BASE.pm index 838137c..b7f4734 100644 --- a/lib/Subtitle/BASE.pm +++ b/lib/Subtitle/BASE.pm @@ -72,7 +72,7 @@ sub build_timing { $sec = int($rest / 1); $msec = sprintf "%.${prec}f", ($rest - ($sec * 1)); $msec =~ s/^0\.//o; - return sprintf("%d:%02d:%02d.%s", $hrs, $min, $sec, $msec); + return sprintf($self->{timing_fmt}, $hrs, $min, $sec, $msec); } sub trim { diff --git a/lib/Subtitle/SRT.pm b/lib/Subtitle/SRT.pm index 78a67ef..ca84972 100644 --- a/lib/Subtitle/SRT.pm +++ b/lib/Subtitle/SRT.pm @@ -15,6 +15,7 @@ sub new { %args, events => [], log => [], + timing_fmt => "%02d:%02d:%02d,%s", }; return bless($self, $class); diff --git a/lib/Subtitle/SSA.pm b/lib/Subtitle/SSA.pm index bbbe018..020e56d 100644 --- a/lib/Subtitle/SSA.pm +++ b/lib/Subtitle/SSA.pm @@ -29,6 +29,7 @@ sub new { styles => [], events => [], log => [], + timing_fmt => "%d:%02d:%02d.%s", }; return bless($self, $class);