1 | <?php |
||
18 | class SqlTimestamp extends AbstractTimestamp implements RecordAccessorInterface |
||
19 | { |
||
20 | /** |
||
21 | * Cached list of record timezones. |
||
22 | * |
||
23 | * @var array |
||
24 | */ |
||
25 | private static $recordTimezones = []; |
||
26 | |||
27 | /** |
||
28 | * @var \DateTimeZone |
||
29 | */ |
||
30 | private $sourceTimezone; |
||
31 | |||
32 | /** |
||
33 | * @param string $value |
||
34 | * @param array $context |
||
35 | */ |
||
36 | public function __construct($value, array $context) |
||
41 | |||
42 | /** |
||
43 | * {@inheritdoc} |
||
44 | */ |
||
45 | protected function fetchTimestamp($value): int |
||
49 | |||
50 | /** |
||
51 | * @param string $field |
||
52 | * |
||
53 | * @return \DateTimeInterface |
||
54 | */ |
||
55 | public function compileUpdates(string $field = '') |
||
59 | |||
60 | /** |
||
61 | * Must locate source timezone, but default checks cache and then performs fallback to |
||
62 | * Driver based check. |
||
63 | * |
||
64 | * @param array $context |
||
65 | * |
||
66 | * @return \DateTimeZone |
||
67 | */ |
||
68 | private function fetchSourceTimezone(array $context): \DateTimeZone |
||
91 | } |