Merge pull request #15 from JonOfUs/main
Solve timezone problems in episode change synchronization
This commit is contained in:
commit
bf4eabc534
|
@ -4,6 +4,7 @@ declare(strict_types=1);
|
||||||
namespace OCA\GPodderSync\Controller;
|
namespace OCA\GPodderSync\Controller;
|
||||||
|
|
||||||
use DateTime;
|
use DateTime;
|
||||||
|
use DateTimeZone;
|
||||||
use GuzzleHttp\Psr7\Response;
|
use GuzzleHttp\Psr7\Response;
|
||||||
use OCA\GPodderSync\Core\EpisodeAction\EpisodeActionReader;
|
use OCA\GPodderSync\Core\EpisodeAction\EpisodeActionReader;
|
||||||
use OCA\GPodderSync\Db\EpisodeAction\EpisodeActionEntity;
|
use OCA\GPodderSync\Db\EpisodeAction\EpisodeActionEntity;
|
||||||
|
@ -110,6 +111,7 @@ class EpisodeActionController extends Controller {
|
||||||
private function convertTimestampToDbDateTimeString(string $timestamp)
|
private function convertTimestampToDbDateTimeString(string $timestamp)
|
||||||
{
|
{
|
||||||
return \DateTime::createFromFormat('D F d H:i:s T Y', $timestamp)
|
return \DateTime::createFromFormat('D F d H:i:s T Y', $timestamp)
|
||||||
|
->setTimezone(new DateTimeZone('UTC'))
|
||||||
->format("Y-m-d\TH:i:s");
|
->format("Y-m-d\TH:i:s");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue