diff --git a/templates/content-index.tpl.html b/templates/content-index.tpl.html
index c6491f5..e6d66fa 100644
--- a/templates/content-index.tpl.html
+++ b/templates/content-index.tpl.html
@@ -34,7 +34,7 @@
%-->
-
+
diff --git a/templates/queries-index-mysql.tpl.html b/templates/queries-index-mysql.tpl.html
index 120b936..5c15dfe 100644
--- a/templates/queries-index-mysql.tpl.html
+++ b/templates/queries-index-mysql.tpl.html
@@ -6,9 +6,9 @@
)
SELECT
MIN(next_id.id_next) AS \'next_id\',
- DATE_FORMAT(MIN(last_date), \'%Y\') AS \'last_year\',
- DATE_FORMAT(MIN(last_date), \'%d\') AS \'last_day\',
- DATE_FORMAT(MIN(last_date), \'%m\') AS \'last_month\'
+ DATE_FORMAT(DATE_ADD(MIN(last_date), INTERVAL 1 DAY), \'%Y\') AS \'last_year\',
+ DATE_FORMAT(DATE_ADD(MIN(last_date), INTERVAL 1 DAY), \'%d\') AS \'last_day\',
+ DATE_FORMAT(DATE_ADD(MIN(last_date), INTERVAL 1 DAY), \'%m\') AS \'last_month\'
FROM next_id
LEFT JOIN eps ON next_id.id_next = eps.id
WHERE eps.id IS NULL
diff --git a/templates/queries-index-sqlite.tpl.html b/templates/queries-index-sqlite.tpl.html
index 1029b05..d855ba0 100644
--- a/templates/queries-index-sqlite.tpl.html
+++ b/templates/queries-index-sqlite.tpl.html
@@ -6,9 +6,9 @@
)
SELECT
MIN(next_id.id_next) AS \'next_id\',
- strftime(\'%Y\', MIN (last_date)) AS \'last_year\',
- strftime(\'%d\', MIN (last_date)) AS \'last_day\',
- strftime(\'%m\', MIN (last_date)) AS \'last_month\'
+ strftime(\'%Y\', DATE (MIN (last_date), \'+1 Days\')) AS \'last_year\',
+ strftime(\'%d\', DATE (MIN (last_date), \'+1 Days\')) AS \'last_day\',
+ strftime(\'%m\', DATE (MIN (last_date), \'+1 Days\')) AS \'last_month\'
FROM next_id
LEFT JOIN eps ON next_id.id_next = eps.id
WHERE eps.id IS NULL