diff options
author | TheTroll <trolldev@gmail.com> | 2010-03-25 11:34:46 +0100 |
---|---|---|
committer | TheTroll <trolldev@gmail.com> | 2010-03-25 11:34:46 +0100 |
commit | e289b52f7761137a1c051357f1126e42ac28002a (patch) | |
tree | d8d4581c13adafd3f3279094ff3ae63c158ddd9c | |
parent | c0ed6d245d377b640a28d3a675397542465e4587 (diff) | |
download | istreamdev-e289b52f7761137a1c051357f1126e42ac28002a.tar.gz istreamdev-e289b52f7761137a1c051357f1126e42ac28002a.tar.bz2 |
readded 3600 sec hack
-rwxr-xr-x | bin/vdr.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/bin/vdr.php b/bin/vdr.php index 075f26b..849548d 100755 --- a/bin/vdr.php +++ b/bin/vdr.php @@ -481,10 +481,10 @@ function vdrgetfullepgat($channel, $at, $programs) function vdrgetepg($channel, $time, $day, $programs, $extended) { // Compute time - $currentdate = gettimeofday(); + $currentdate = time(); // Remove current day seconds - $currentday = $currentdate['sec'] - ($currentdate['sec'] % (3600*24)); + $currentday = $currentdate - ($currentdate % (3600*24)); switch ($programs) { @@ -495,7 +495,7 @@ function vdrgetepg($channel, $time, $day, $programs, $extended) case "day": // Get all day - $requesteddate = $currentdate['sec'] - ($currentdate['sec'] % (3600*24)) + ($day * (3600*24)); + $requesteddate = $currentdate - ($currentdate % (3600*24)) + ($day * (3600*24)) - 3600; break; default: @@ -503,12 +503,12 @@ function vdrgetepg($channel, $time, $day, $programs, $extended) switch ($time) { case "now": - $requesteddate = $currentdate['sec']; + $requesteddate = $currentdate; break; default: - $requestedday = $currentdate['sec'] - ($currentdate['sec'] % (3600*24)) + ($day * (3600*24)); + $requestedday = $currentdate - ($currentdate % (3600*24)) + ($day * (3600*24)); $requestedtime = ((int) substr($time, 0, 2) * 3600) + ((int) substr($time, 2) * 60); - $requesteddate = $requestedday + $requestedtime; + $requesteddate = $requestedday + $requestedtime - 3600; break; } } |