Overview
Comment: | SQLite3: do not convert datetime to UTC, this may lead to issues |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | 7.3 |
Files: | files | file ages | folders |
SHA1: |
bbf78986c3dfb9a3ad9ba5b1df2d2775 |
User & Date: | bohwaz on 2022-02-10 15:52:02 |
Other Links: | branch diff | manifest | tags |
Context
2022-02-13
| ||
23:47 | Garbage2xhtml: Fix PHP 8.1 warning check-in: 09c9439261 user: bohwaz tags: 7.3 | |
2022-02-10
| ||
15:52 | SQLite3: do not convert datetime to UTC, this may lead to issues check-in: bbf78986c3 user: bohwaz tags: 7.3 | |
2022-02-09
| ||
23:53 | Smartyer: add support for relative path in include check-in: 56c236d182 user: bohwaz tags: 7.3 | |
Changes
Modified src/lib/KD2/DB/SQLite3.php from [c6ec9f29cb] to [5c89f10d99].
︙ | ︙ | |||
44 45 46 47 48 49 50 | protected $transaction = 0; /** * @var integer|null */ protected $flags = null; | | > | 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | protected $transaction = 0; /** * @var integer|null */ protected $flags = null; const DATE_FORMAT = 'Y-m-d'; const DATETIME_FORMAT = 'Y-m-d H:i:s'; public function close(): void { $this->__destruct(); if (null !== $this->db) { $this->db->close(); |
︙ | ︙ | |||
224 225 226 227 228 229 230 | $arg = $arg[1]; return $type; } case 'object': if ($arg instanceof \DateTime) { | | | > > | > > | 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 | $arg = $arg[1]; return $type; } case 'object': if ($arg instanceof \DateTime) { if ($arg->format('His') === '000000') { $arg = $arg->format(self::DATE_FORMAT); } else { $arg = $arg->format(self::DATETIME_FORMAT); } return \SQLITE3_TEXT; } default: throw new \InvalidArgumentException('Argument '.$name.' is of invalid type '.gettype($arg)); } } |
︙ | ︙ |