diff --git a/include/tools.php b/include/tools.php
index 06cdc44..204436f 100644
--- a/include/tools.php
+++ b/include/tools.php
@@ -89,37 +89,39 @@ function checkSetup() {
}
function startStopwatch() {
- $time = microtime();
- $time = explode(' ', $time);
- $time = $time[1] + $time[0];
- $_SESSION['starttime'] = $time;
- return $time;
+ $time = microtime();
+ $time = explode(' ', $time);
+ $time = $time[1] + $time[0];
+ $_SESSION['starttime'] = $time;
+ return $time;
}
function getLapTime() {
- $start = $_SESSION['starttime'];
- $time = microtime();
- $time = explode(' ', $time);
- $time = $time[1] + $time[0];
- $finish = $time;
- $lap_time = round(($finish - $start), 4);
- return $lap_time;
+ $start = $_SESSION['starttime'];
+ $time = microtime();
+ $time = explode(' ', $time);
+ $time = $time[1] + $time[0];
+ $finish = $time;
+ $lap_time = round(($finish - $start), 4);
+ return $lap_time;
}
function showLapTime($func) {
- if( defined("DEBUG") ) {
- ?>setTimezone(new DateTimeZone(TIMEZONE));
- return $date->format('Y-m-d H:i:s');
+ try {
+ $date = new DateTime($timestamp);
+ $date->setTimezone(new DateTimeZone(TIMEZONE));
+ return $date->format('Y-m-d H:i:s');
+ } catch (Exception $err) {}
}
function encode($hex) {
- $validchars = " abcdefghijklmnopqrstuvwxyzäöüßABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÜ0123456789";
+ $validchars = " abcdefghijklmnopqrstuvwxyzäöüßABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÜ0123456789";
$str = '';
$chrval = hexdec($hex);
$str = chr($chrval);
diff --git a/version.php b/version.php
index 8fde4b8..c60fe7c 100644
--- a/version.php
+++ b/version.php
@@ -1,3 +1,3 @@