mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Fixing Lock File serialization on international systems
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user