Skip to content

[Xamarin.Android.Build.Tasks] Make use we use UTC Dates for ResolveLibraryProjectImports.cs #768

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 23, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ void Extract (

// Skip already-extracted resources.
var stamp = new FileInfo (Path.Combine (outdir.FullName, assemblyIdentName + ".stamp"));
if (stamp.Exists && stamp.LastWriteTime > new FileInfo (assemblyPath).LastWriteTime) {
if (stamp.Exists && stamp.LastWriteTimeUtc > new FileInfo (assemblyPath).LastWriteTimeUtc) {
Log.LogDebugMessage ("Skipped resource lookup for {0}: extracted files are up to date", assemblyPath);
#if SEPARATE_CRUNCH
// FIXME: review these binResDir/binAssemblyDir thing and enable this. Eclipse does this.
Expand All @@ -211,7 +211,7 @@ void Extract (
Directory.CreateDirectory (importsDir);

var assembly = res.GetAssembly (assemblyPath);
var assemblyLastWrite = new FileInfo (assemblyPath).LastWriteTime;
var assemblyLastWrite = new FileInfo (assemblyPath).LastWriteTimeUtc;
bool updated = false;

foreach (var mod in assembly.Modules) {
Expand All @@ -223,7 +223,7 @@ void Extract (
if (!Directory.Exists (outDirForDll))
Directory.CreateDirectory (outDirForDll);
var finfo = new FileInfo (Path.Combine (outDirForDll, envtxt.Name));
if (!finfo.Exists || finfo.LastWriteTime > assemblyLastWrite) {
if (!finfo.Exists || finfo.LastWriteTimeUtc > assemblyLastWrite) {
using (var fs = finfo.Create ()) {
var data = envtxt.GetResourceData ();
fs.Write (data, 0, data.Length);
Expand All @@ -240,7 +240,7 @@ void Extract (
foreach (var resjar in resjars) {
var outjarFile = Path.Combine (importsDir, resjar.Name);
var fi = new FileInfo (outjarFile);
if (!fi.Exists || fi.LastWriteTime > assemblyLastWrite) {
if (!fi.Exists || fi.LastWriteTimeUtc > assemblyLastWrite) {
var data = resjar.GetResourceData ();
using (var outfs = File.Create (outjarFile))
outfs.Write (data, 0, data.Length);
Expand Down