diff options
author | Michael Kuhn <[email protected]> | 2018-12-09 18:28:15 +0100 |
---|---|---|
committer | Michael Kuhn <[email protected]> | 2018-12-09 18:28:15 +0100 |
commit | 3484ad2aafcd6f7804f5e9fc249af427a1b71ff7 (patch) | |
tree | 4b57280d25acda7ecf8f1f0f6f26ebed997fb801 /classes | |
parent | 6a6af964df3d1242b84872ea0c937cc655699c6c (diff) |
Use IYYY in combination with IW
Otherwise, we could end up with a wrong date, see:
https://community.oracle.com/thread/997899
Diffstat (limited to 'classes')
-rwxr-xr-x | classes/feeds.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/classes/feeds.php b/classes/feeds.php index c31f4b676..6a16cd85b 100755 --- a/classes/feeds.php +++ b/classes/feeds.php @@ -1698,7 +1698,7 @@ class Feeds extends Handler_Protected { if (DB_TYPE == "pgsql") { $sanity_interval_qpart = "date_entered >= NOW() - INTERVAL '1 hour' AND"; - $yyiw_qpart = "to_char(date_entered, 'YYYY-IW') AS yyiw"; + $yyiw_qpart = "to_char(date_entered, 'IYYY-IW') AS yyiw"; } else { $sanity_interval_qpart = "date_entered >= DATE_SUB(NOW(), INTERVAL 1 hour) AND"; $yyiw_qpart = "concat(year(date_entered),lpad(weekofyear(date_entered), 2, '0')) AS yyiw"; |