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

This commit is contained in:
Luke Pulverenti 2014-01-24 10:30:05 -05:00
parent 06563e83c6
commit e92688fbec
3 changed files with 5 additions and 5 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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)
{