mirror of
https://github.com/dwaxweiler/connector-mobilizon
synced 2025-06-05 21:59:25 +02:00
wip
This commit is contained in:
15
source/includes/LocalDateTime.php
Normal file
15
source/includes/LocalDateTime.php
Normal file
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
namespace MobilizonConnector;
|
||||
|
||||
final class LocalDateTime {
|
||||
private $dateTime;
|
||||
|
||||
public function __construct(string $text, \DateTimeZone $timeZone) {
|
||||
$date = new \DateTimeImmutable($text);
|
||||
$this->dateTime = $date->setTimezone($timeZone);
|
||||
}
|
||||
|
||||
public function getValue() {
|
||||
return $this->dateTime;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user