diff --git a/src/Logic/SubtitleFormats/TranscriberXml.cs b/src/Logic/SubtitleFormats/TranscriberXml.cs
index 15893ca25..3497856d0 100644
--- a/src/Logic/SubtitleFormats/TranscriberXml.cs
+++ b/src/Logic/SubtitleFormats/TranscriberXml.cs
@@ -124,8 +124,8 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
string startTime = node.Attributes["startTime"].InnerText;
string text = node.InnerText;
var p = new Paragraph();
- p.StartTime.TotalSeconds = Convert.ToDouble(startTime);
- p.EndTime.TotalSeconds = Convert.ToDouble(endTime);
+ p.StartTime.TotalSeconds = Convert.ToDouble(startTime, System.Globalization.CultureInfo.InvariantCulture);
+ p.EndTime.TotalSeconds = Convert.ToDouble(endTime, System.Globalization.CultureInfo.InvariantCulture);
p.Text = text;
subtitle.Paragraphs.Add(p);
}
diff --git a/src/Logic/SubtitleFormats/UTSubtitleXml.cs b/src/Logic/SubtitleFormats/UTSubtitleXml.cs
index ae1c4ae80..3b8c3c5d8 100644
--- a/src/Logic/SubtitleFormats/UTSubtitleXml.cs
+++ b/src/Logic/SubtitleFormats/UTSubtitleXml.cs
@@ -55,11 +55,11 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
XmlNode ut = xml.CreateElement("ut");
XmlAttribute et = xml.CreateAttribute("secOut");
- et.InnerText = string.Format("{0:0.000}", p.EndTime.TotalSeconds).Replace(",", ".");
+ et.InnerText = string.Format("{0:0.0##}", p.EndTime.TotalSeconds).Replace(",", ".");
ut.Attributes.Append(et);
XmlAttribute st = xml.CreateAttribute("secIn");
- st.InnerText = string.Format("{0:0.000}", p.StartTime.TotalSeconds).Replace(",", ".");
+ st.InnerText = string.Format("{0:0.0##}", p.StartTime.TotalSeconds).Replace(",", ".");
ut.Attributes.Append(st);
//ut.InnerText = p.Text;
@@ -100,8 +100,8 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
string text = node.InnerText;
text = text.Replace("
", Environment.NewLine).Replace("
", Environment.NewLine);
var p = new Paragraph();
- p.StartTime.TotalSeconds = Convert.ToDouble(startTime);
- p.EndTime.TotalSeconds = Convert.ToDouble(endTime);
+ p.StartTime.TotalSeconds = Convert.ToDouble(startTime, System.Globalization.CultureInfo.InvariantCulture);
+ p.EndTime.TotalSeconds = Convert.ToDouble(endTime, System.Globalization.CultureInfo.InvariantCulture);
p.Text = text;
subtitle.Paragraphs.Add(p);
}