Skip to content

Commit 4263232

Browse files
committed
Update MySQLDataReader.php
1 parent cc5082a commit 4263232

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

berry/mysql/MySQLDataReader.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,21 @@ public function getValue(int $index)
9494
*/
9595
public function getDateTime(int $index, DateTimeZone $timeZone): DateTime
9696
{
97-
$dt = new DateTime($this->fReadValues[$index]);
97+
$dt = new DateTime($this->fReadValues[$index], new DateTimeZone('UTC'));
9898
$dt->setTimezone($timeZone);
9999
return $dt;
100100
}
101+
102+
/**
103+
* Return the read datetime value
104+
* @param int $index
105+
* @return DateTimeF
106+
*/
107+
public function getDateTimeUTC(int $index): DateTime
108+
{
109+
$dt = new DateTime($this->fReadValues[$index]);
110+
return $dt;
111+
}
101112
}
102113

103114
?>

0 commit comments

Comments
 (0)