fixes #689 - Release date off by day in some locales

pull/702/head
Luke Pulverenti 11 years ago
parent 06563e83c6
commit e92688fbec

@ -109,7 +109,7 @@ namespace MediaBrowser.Providers.Savers
if (episode.PremiereDate.HasValue)
{
builder.Append("<FirstAired>" + SecurityElement.Escape(episode.PremiereDate.Value.ToString("yyyy-MM-dd")) + "</FirstAired>");
builder.Append("<FirstAired>" + SecurityElement.Escape(episode.PremiereDate.Value.ToLocalTime().ToString("yyyy-MM-dd")) + "</FirstAired>");
}
XmlSaverHelpers.AddCommonNodes(item, builder);

@ -95,7 +95,7 @@ namespace MediaBrowser.Providers.Savers
if (series.PremiereDate.HasValue)
{
builder.Append("<FirstAired>" + SecurityElement.Escape(series.PremiereDate.Value.ToString("yyyy-MM-dd")) + "</FirstAired>");
builder.Append("<FirstAired>" + SecurityElement.Escape(series.PremiereDate.Value.ToLocalTime().ToString("yyyy-MM-dd")) + "</FirstAired>");
}
XmlSaverHelpers.AddCommonNodes(item, builder);

@ -252,11 +252,11 @@ namespace MediaBrowser.Providers.Savers
{
if (item is Person)
{
builder.Append("<BirthDate>" + SecurityElement.Escape(item.PremiereDate.Value.ToString("yyyy-MM-dd")) + "</BirthDate>");
builder.Append("<BirthDate>" + SecurityElement.Escape(item.PremiereDate.Value.ToLocalTime().ToString("yyyy-MM-dd")) + "</BirthDate>");
}
else if (!(item is Episode))
{
builder.Append("<PremiereDate>" + SecurityElement.Escape(item.PremiereDate.Value.ToString("yyyy-MM-dd")) + "</PremiereDate>");
builder.Append("<PremiereDate>" + SecurityElement.Escape(item.PremiereDate.Value.ToLocalTime().ToString("yyyy-MM-dd")) + "</PremiereDate>");
}
}
@ -358,7 +358,7 @@ namespace MediaBrowser.Providers.Savers
}
// Use original runtime here, actual file runtime later in MediaInfo
var runTimeTicks = item.OriginalRunTimeTicks ?? item.RunTimeTicks;
var runTimeTicks = item.RunTimeTicks;
if (runTimeTicks.HasValue)
{

Loading…
Cancel
Save