mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Fixing Lock File serialization on international systems
This commit is contained in:
@@ -27,7 +27,7 @@ namespace Orchard.FileSystems.LockFile {
|
||||
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;
|
||||
}
|
||||
catch {
|
||||
@@ -63,7 +63,7 @@ namespace Orchard.FileSystems.LockFile {
|
||||
// if expired the file is not removed
|
||||
// it should be automatically as there is a finalizer in LockFile
|
||||
// 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