Fixed invalid local time usages. fixes #299
This commit is contained in:
@@ -22,8 +22,6 @@
|
||||
#include <ctime>
|
||||
#include <boost/asio/placeholders.hpp>
|
||||
|
||||
#include <Wt/WLocalDateTime.h>
|
||||
|
||||
#include "services/database/Artist.hpp"
|
||||
#include "services/database/Cluster.hpp"
|
||||
#include "services/database/Release.hpp"
|
||||
@@ -389,7 +387,7 @@ ScannerService::scheduleNextScan()
|
||||
|
||||
refreshScanSettings();
|
||||
|
||||
const Wt::WDateTime now {Wt::WLocalDateTime::currentServerDateTime().toUTC()};
|
||||
const Wt::WDateTime now {Wt::WDateTime::currentDateTime()};
|
||||
|
||||
Wt::WDateTime nextScanDateTime;
|
||||
switch (_updatePeriod)
|
||||
@@ -502,7 +500,7 @@ ScannerService::scan(bool forceScan)
|
||||
}
|
||||
|
||||
ScanStats stats;
|
||||
stats.startTime = Wt::WLocalDateTime::currentDateTime().toUTC();
|
||||
stats.startTime = Wt::WDateTime::currentDateTime();
|
||||
|
||||
LMS_LOG(UI, INFO) << "New scan started!";
|
||||
|
||||
@@ -534,7 +532,7 @@ ScannerService::scan(bool forceScan)
|
||||
|
||||
if (!_abortScan)
|
||||
{
|
||||
stats.stopTime = Wt::WLocalDateTime::currentDateTime().toUTC();
|
||||
stats.stopTime = Wt::WDateTime::currentDateTime();
|
||||
{
|
||||
std::unique_lock lock {_statusMutex};
|
||||
|
||||
@@ -777,7 +775,7 @@ ScannerService::scanAudioFile(const std::filesystem::path& file, bool forceScan,
|
||||
track.modify()->setLastWriteTime(lastWriteTime);
|
||||
track.modify()->setName(title);
|
||||
track.modify()->setDuration(trackInfo->duration);
|
||||
track.modify()->setAddedTime(Wt::WLocalDateTime::currentServerDateTime().toUTC());
|
||||
track.modify()->setAddedTime(Wt::WDateTime::currentDateTime());
|
||||
track.modify()->setTrackNumber(trackInfo->trackNumber ? *trackInfo->trackNumber : 0);
|
||||
track.modify()->setDiscNumber(trackInfo->discNumber ? *trackInfo->discNumber : 0);
|
||||
track.modify()->setTotalTrack(trackInfo->totalTrack);
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <map>
|
||||
#include <unordered_map>
|
||||
|
||||
#include <Wt/WLocalDateTime.h>
|
||||
#include <Wt/WDateTime.h>
|
||||
|
||||
#include "services/auth/IPasswordService.hpp"
|
||||
#include "services/auth/IEnvService.hpp"
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include <iomanip>
|
||||
|
||||
#include <Wt/Http/Response.h>
|
||||
#include <Wt/WLocalDateTime.h>
|
||||
#include <Wt/WDateTime.h>
|
||||
|
||||
#include "services/database/Artist.hpp"
|
||||
#include "services/database/Release.hpp"
|
||||
@@ -178,7 +178,7 @@ createZipper(const std::vector<Database::Track::pointer>& tracks)
|
||||
files.emplace(fileName, track->getPath());
|
||||
}
|
||||
|
||||
return std::make_unique<Zip::Zipper>(files, Wt::WLocalDateTime::currentDateTime().toUTC());
|
||||
return std::make_unique<Zip::Zipper>(files, Wt::WDateTime::currentDateTime());
|
||||
}
|
||||
|
||||
DownloadArtistResource::DownloadArtistResource(Database::ArtistId artistId)
|
||||
|
||||
Reference in New Issue
Block a user