mirror of
https://github.com/bitwarden/mobile
synced 2025-12-16 00:03:22 +00:00
Convert everything back to UTC since thats now settings plugin stores them. Move sync page ToLocalTime conversion.
This commit is contained in:
@@ -135,7 +135,7 @@ namespace Bit.App.Services
|
||||
|
||||
SyncStarted();
|
||||
|
||||
var now = DateTime.Now;
|
||||
var now = DateTime.UtcNow;
|
||||
var ciphers = await _cipherApiRepository.GetAsync();
|
||||
if(!ciphers.Succeeded)
|
||||
{
|
||||
@@ -168,7 +168,7 @@ namespace Bit.App.Services
|
||||
public async Task<bool> IncrementalSyncAsync(TimeSpan syncThreshold)
|
||||
{
|
||||
DateTime? lastSync = _settings.GetValueOrDefault<DateTime?>(Constants.SettingLastSync);
|
||||
if(lastSync != null && DateTime.Now - lastSync.Value < syncThreshold)
|
||||
if(lastSync != null && DateTime.UtcNow - lastSync.Value < syncThreshold)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -183,7 +183,7 @@ namespace Bit.App.Services
|
||||
return false;
|
||||
}
|
||||
|
||||
var now = DateTime.Now;
|
||||
var now = DateTime.UtcNow;
|
||||
DateTime? lastSync = _settings.GetValueOrDefault<DateTime?>(Constants.SettingLastSync);
|
||||
if(lastSync == null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user