Fixed that /api/system/db-changed-time always returned the current time

This commit is contained in:
Bernd Bestel
2019-09-17 17:49:58 +02:00
parent db0c4f78bd
commit 0771d58fe7
4 changed files with 16 additions and 0 deletions

View File

@@ -68,4 +68,9 @@ class DatabaseService
{
return date('Y-m-d H:i:s', filemtime(GROCY_DATAPATH . '/grocy.db'));
}
public function SetDbChangedTime($dateTime)
{
touch(GROCY_DATAPATH . '/grocy.db', strtotime($dateTime));
}
}