mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-21 05:43:32 -07:00
Merge pull request #13328 from FranciscoPombal/fix_geodb
Fix GeoDB download in systems with non-C locales
This commit is contained in:
commit
84be5ed664
1 changed files with 3 additions and 2 deletions
|
@ -33,6 +33,7 @@
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QHostAddress>
|
#include <QHostAddress>
|
||||||
|
#include <QLocale>
|
||||||
|
|
||||||
#include "base/logger.h"
|
#include "base/logger.h"
|
||||||
#include "base/preferences.h"
|
#include "base/preferences.h"
|
||||||
|
@ -124,8 +125,8 @@ void GeoIPManager::manageDatabaseUpdate()
|
||||||
|
|
||||||
void GeoIPManager::downloadDatabaseFile()
|
void GeoIPManager::downloadDatabaseFile()
|
||||||
{
|
{
|
||||||
const QDate curDate = QDateTime::currentDateTimeUtc().date();
|
const QDateTime curDatetime = QDateTime::currentDateTimeUtc();
|
||||||
const QString curUrl = DATABASE_URL.arg(curDate.toString("yyyy-MM"));
|
const QString curUrl = DATABASE_URL.arg(QLocale::c().toString(curDatetime, "yyyy-MM"));
|
||||||
DownloadManager::instance()->download({curUrl}, this, &GeoIPManager::downloadFinished);
|
DownloadManager::instance()->download({curUrl}, this, &GeoIPManager::downloadFinished);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue