mirror of
https://github.com/silverstripe/silverstripe-mssql
synced 2024-10-22 08:05:53 +02:00
BUGFIX MSSQLDatabase::formattedDatetimeClause() should start the epoch at 1/1/1970 12:00 instead of 00:00 which it defaults at, otherwise comparing it to PHP produces a full 24 hour time difference
This commit is contained in:
parent
7fad117464
commit
b5edca6f91
@ -1372,7 +1372,7 @@ class MSSQLDatabase extends SS_Database {
|
||||
$date = "'$date.000'";
|
||||
}
|
||||
|
||||
if($format == '%U') return "DATEDIFF(s, '19700101', $date)";
|
||||
if($format == '%U') return "DATEDIFF(s, '19700101 12:00:00:000', $date)";
|
||||
|
||||
$trans = array(
|
||||
'Y' => 'yy',
|
||||
|
Loading…
Reference in New Issue
Block a user