Make the app independent from the server timezone

When getting local time in SQLite, the local time is generated taking
into account the timezone set in the server, not in PHP. Therefore,
this made it compulsory to set the "Europe/Madrid" timezone for the
whole server.

This change fixes this by generating local timestamps directly in PHP
instead than in SQLite, therefore allowing the server timezone to be
set freely without this app malfunctioning.

Change-Id: I5345772d9b7a2521c98143a90e4154eaa4cd35f6
diff --git a/core.php b/core.php
index 89c2ec0..05c9411 100644
--- a/core.php
+++ b/core.php
@@ -12,5 +12,5 @@
 require_once(__DIR__."/config.php");
 
 // Setting timezone and locale accordingly
-date_default_timezone_set("Europe/Madrid");
+if (isset($conf["timezone"])) date_default_timezone_set($conf["timezone"]);
 setlocale(LC_TIME, 'es_ES.UTF-8', 'es_ES', 'es');