diff --git a/includes/config.example.php b/includes/config.example.php index 94e1192..6c65602 100755 --- a/includes/config.example.php +++ b/includes/config.example.php @@ -3,6 +3,8 @@ ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); +locale_set_default("fr_FR"); +date_default_timezone_set("UTC"); // Default tz for date manipulation is UTC. Display tz is in session.php /***** diff --git a/includes/session.php b/includes/session.php index 137110a..73929f1 100755 --- a/includes/session.php +++ b/includes/session.php @@ -15,14 +15,14 @@ if(isset($_SESSION['userid'])) { } else { session_destroy(); - $config['locale'] = locale_get_default(); - $config['timezone'] = date_default_timezone_get(); + $config['locale'] = "fr_FR"; + $config['timezone'] = "Europe/Paris"; $user->rank = "visitor"; // All users are visitors } } else { - $config['locale'] = locale_get_default(); - $config['timezone'] = date_default_timezone_get(); + $config['locale'] = "fr_FR"; + $config['timezone'] = "Europe/Paris"; $user->rank = "visitor"; // All users are visitors } diff --git a/views/d.blog.list.html b/views/d.blog.list.html index ebfdeeb..0dc2cb1 100755 --- a/views/d.blog.list.html +++ b/views/d.blog.list.html @@ -27,7 +27,7 @@
Lire la suite... - Le echo datefmt_format($user->date_format,strtotime($row->update_date)) ?> par + echo datefmt_format($user->date_format,date_create($row->update_date, new DateTimeZone("UTC"))) ?> par if ($user->rankIsHigher("registered")) { ?> =$row->author_name?> } diff --git a/views/d.blog.view.html b/views/d.blog.view.html index 7bd80c1..6346d9a 100755 --- a/views/d.blog.view.html +++ b/views/d.blog.view.html @@ -15,7 +15,7 @@ @@ -45,7 +45,7 @@ else { ?> =$blogArticle->author_name?> } ?> - le echo datefmt_format($user->datetime_format,strtotime($blogArticle->creation_date)) ?>
+ le echo datefmt_format($user->datetime_format,date_create($blogArticle->creation_date, new DateTimeZone("UTC"))) ?> @@ -83,7 +83,7 @@ } else { ?> =$comment->author_obj->name?> } ?> - le echo datefmt_format($user->datetime_format,strtotime($comment->update_date)) ?> + le echo datefmt_format($user->datetime_format,date_create($comment->update_date, new DateTimeZone("UTC"))) ?> if (($user->rankIsHigher("moderator") || $user->id == $comment->author) && $comment->is_public == 't') { ?> Effacer le commentaire } ?> diff --git a/views/d.user.member_list.html b/views/d.user.member_list.html index aadd3ab..505a2b8 100755 --- a/views/d.user.member_list.html +++ b/views/d.user.member_list.html @@ -45,8 +45,8 @@ =$row->name?>Langue : =$userProfile->get_locale()?>
-Inscrit le echo datefmt_format($user->datetime_format,strtotime($userProfile->register_date)) ?>
-Dernière connexion le echo datefmt_format($user->datetime_format,strtotime($userProfile->visit_date)) ?>
+Inscrit le echo datefmt_format($user->datetime_format,date_create($userProfile->register_date, new DateTimeZone("UTC"))) ?>
+Dernière connexion le echo datefmt_format($user->datetime_format,date_create($userProfile->visit_date, new DateTimeZone("UTC"))) ?>
=$userProfile->get_rank()?>
if ($userProfile->website != "") { ?> diff --git a/views/d.wiki.view.html b/views/d.wiki.view.html index 836eaca..d7385b8 100755 --- a/views/d.wiki.view.html +++ b/views/d.wiki.view.html @@ -15,7 +15,7 @@ @@ -38,7 +38,7 @@ =$wikiPage->content_html?>
Page mise à jour le echo datefmt_format($user->datetime_format,strtotime($wikiPage->update_date)) ?>
+Page mise à jour le echo datefmt_format($user->datetime_format,date_create($wikiPage->update_date, new DateTimeZone("UTC"))) ?>