Fixing Lock File serialization on international systems

This commit is contained in:
Sebastien Ros
2014-07-30 10:09:59 -07:00
parent 9d3f5c2d20
commit 211ffaf647
@@ -27,7 +27,7 @@ namespace Orchard.FileSystems.LockFile {
return false; return false;
} }
lockFile = new LockFile(_appDataFolder, path, _clock.UtcNow.ToString(CultureInfo.InvariantCulture), _rwLock); lockFile = new LockFile(_appDataFolder, path, _clock.UtcNow.ToString("u"), _rwLock);
return true; return true;
} }
catch { catch {
@@ -63,7 +63,7 @@ namespace Orchard.FileSystems.LockFile {
// if expired the file is not removed // if expired the file is not removed
// it should be automatically as there is a finalizer in LockFile // it should be automatically as there is a finalizer in LockFile
// or the next taker can do it, unless it also fails, again // or the next taker can do it, unless it also fails, again
return creationUtc.Add(Expiration) > _clock.UtcNow; return creationUtc.ToUniversalTime().Add(Expiration) > _clock.UtcNow;
} }
} }