PluginProbe ʕ •ᴥ•ʔ
Booking for Appointments and Events Calendar – Amelia / 1.2.20
Booking for Appointments and Events Calendar – Amelia v1.2.20
2.4.4 2.4.3 2.4.2 2.4.1 2.4 trunk 1.2.1 1.2.10 1.2.11 1.2.12 1.2.13 1.2.14 1.2.15 1.2.16 1.2.17 1.2.18 1.2.19 1.2.2 1.2.20 1.2.21 1.2.22 1.2.23 1.2.24 1.2.25 1.2.26 1.2.27 1.2.28 1.2.29 1.2.3 1.2.30 1.2.31 1.2.32 1.2.33 1.2.34 1.2.35 1.2.36 1.2.37 1.2.38 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 2.0 2.0.1 2.0.2 2.1 2.1.1 2.1.2 2.1.3 2.2 2.2.1 2.3
ameliabooking / vendor / sabre / vobject / lib / TimezoneGuesser / FindFromOffset.php
ameliabooking / vendor / sabre / vobject / lib / TimezoneGuesser Last commit date
FindFromOffset.php 1 year ago FindFromTimezoneIdentifier.php 1 year ago FindFromTimezoneMap.php 1 year ago GuessFromLicEntry.php 1 year ago GuessFromMsTzId.php 1 year ago TimezoneFinder.php 1 year ago TimezoneGuesser.php 1 year ago
FindFromOffset.php
32 lines
1 <?php
2
3 declare(strict_types=1);
4
5 namespace Sabre\VObject\TimezoneGuesser;
6
7 use DateTimeZone;
8
9 /**
10 * Some clients add 'X-LIC-LOCATION' with the olson name.
11 */
12 class FindFromOffset implements TimezoneFinder
13 {
14 public function find(string $tzid, bool $failIfUncertain = false): ?DateTimeZone
15 {
16 // Maybe the author was hyper-lazy and just included an offset. We
17 // support it, but we aren't happy about it.
18 if (preg_match('/^GMT(\+|-)([0-9]{4})$/', $tzid, $matches)) {
19 // Note that the path in the source will never be taken from PHP 5.5.10
20 // onwards. PHP 5.5.10 supports the "GMT+0100" style of format, so it
21 // already gets returned early in this function. Once we drop support
22 // for versions under PHP 5.5.10, this bit can be taken out of the
23 // source.
24 // @codeCoverageIgnoreStart
25 return new DateTimeZone('Etc/GMT'.$matches[1].ltrim(substr($matches[2], 0, 2), '0'));
26 // @codeCoverageIgnoreEnd
27 }
28
29 return null;
30 }
31 }
32