1
0
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:
Kyle Spearrin
2016-08-02 00:32:57 -04:00
parent 625be7fdd4
commit 2947809d78
8 changed files with 10 additions and 10 deletions

View File

@@ -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)
{