Skip to content
Permalink
Browse files

set timezone to Europe/Paris

  • Loading branch information...
devnewton committed May 1, 2018
1 parent 3dc24a3 commit 2fc92076021d6b58f20012cfcd8f628ecb8b0a6b
Showing with 4 additions and 2 deletions.
  1. +2 −2 common.php
  2. +2 −0 config.php
@@ -5,7 +5,7 @@
function taab_echo_backend($lastId, $room = '', $newPostId = NULL) {
global $pdo;
$posts = $pdo->prepare(
"SELECT id, strftime('%Y%m%d%H%M%S', time) as time, login, info, message
"SELECT id, strftime('%s', time) as time, login, info, message
FROM posts
WHERE id > :lastId
and room = :room
@@ -23,7 +23,7 @@ function taab_echo_backend($lastId, $room = '', $newPostId = NULL) {
while($post = $posts->fetch(PDO::FETCH_OBJ)) {
fputs($outstream, $post->id);
fputs($outstream, "\t");
fputs($outstream, $post->time);
fputs($outstream, strftime('%Y%m%d%H%M%S', $post->time));
fputs($outstream, "\t");
fputs($outstream, $post->info);
fputs($outstream, "\t");
@@ -1,5 +1,7 @@
<?php
date_default_timezone_set('Europe/Paris');
$pdo = new PDO('sqlite:./data/backend.db');
$pdo->query("CREATE TABLE IF NOT EXISTS posts (

0 comments on commit 2fc9207

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.