Closed albertlast closed 6 years ago
When you care about postgres some changes are needed: https://github.com/dragomano/Optimus/blob/e5f931dedeef0937078fdbaac3813515499c6ea6/Sources/Class-Optimus.php#L222 replace ifnull with coalesce, got the advantage that you can give unlimited amount of col.
the last issue is the use of double quote here: https://github.com/dragomano/Optimus/blob/e5f931dedeef0937078fdbaac3813515499c6ea6/Sources/Class-OptimusSitemap.php#L148
since you want only the year the best approache would be to use the unix timestamp and convert this in your while loop below: https://github.com/dragomano/Optimus/blob/e5f931dedeef0937078fdbaac3813515499c6ea6/Sources/Class-OptimusSitemap.php#L161-L162
$row['poster_time'] = date('Y', $row['poster_time']);
Advantage you also take the timezone information into the account, which could otherwise provide issue when you a unix timestamp is around 31.12. and 1.1.
Thanks. Did you mean these changes?
yes this should work (i didn't installed you mod, i only look throw)
Ok. I have just tested, no issues.
When you care about postgres some changes are needed: https://github.com/dragomano/Optimus/blob/e5f931dedeef0937078fdbaac3813515499c6ea6/Sources/Class-Optimus.php#L222 replace ifnull with coalesce, got the advantage that you can give unlimited amount of col.
the last issue is the use of double quote here: https://github.com/dragomano/Optimus/blob/e5f931dedeef0937078fdbaac3813515499c6ea6/Sources/Class-OptimusSitemap.php#L148
since you want only the year the best approache would be to use the unix timestamp and convert this in your while loop below: https://github.com/dragomano/Optimus/blob/e5f931dedeef0937078fdbaac3813515499c6ea6/Sources/Class-OptimusSitemap.php#L161-L162
Advantage you also take the timezone information into the account, which could otherwise provide issue when you a unix timestamp is around 31.12. and 1.1.