Merge pull request #51 from subdiox/master

Fix an issue that SRT time format is incorrect
This commit is contained in:
anidl 2021-05-02 14:15:08 +03:00 committed by GitHub
commit 0522abdded
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -161,7 +161,7 @@ function toSubsTime(str, srtFormat) {
sx = sx.toFixed(msLen).split('.');
n.unshift(padTimeNum('.', sx[1], msLen));
n.unshift(padTimeNum((srtFormat ? ',' : '.'), sx[1], msLen));
sx = Number(sx[0]);
n.unshift(padTimeNum(':', sx%60, 2));