Search
j0ke.net Open Build Service
>
Projects
>
ha
:
firewall
>
webfwlog
> webfwlog-0.94-timezone.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File webfwlog-0.94-timezone.patch of Package webfwlog
Index: webfwlog.conf.in =================================================================== --- webfwlog.conf.in (revision 435) +++ webfwlog.conf.in (working copy) @@ -141,6 +141,19 @@ # Default: "m/d/Y h:i:sA" dformat = "m/d/Y h:i:sA" +# Timezone to use if date.timezone is not set in php.ini. This applies to +# PHP >= 5.1 only, otherwise it is ignored. +# +# Versions of PHP >= 5.1.0 give an E_STRICT message if date.timezone is not +# set in php.ini. Beginning with PHP 5.3.0 the message is at E_WARNING level. +# A system-wide solution is to set date.timezone in php.ini; this parameter +# affect webfwlog only. +# +# See http://www.php.net/manual/en/datetime.configuration.php#ini.date.timezone +# +# Default: "UTC" +timezone = "UTC" + # Set allow_raw_sql to any non-zero value to allow the user to add raw # raw SQL to the column definitions, and WHERE and HAVING clauses of SQL # queries of data logged in a database. If your data is logged in syslog files Index: webfwlog/include/config.php.in =================================================================== --- webfwlog/include/config.php.in (revision 456) +++ webfwlog/include/config.php.in (working copy) @@ -35,6 +35,7 @@ $config["title"] = "Firewall Log Report"; $config["refresh"] = 0; $config["dformat"] = "m/d/Y h:i:sA"; +$config["timezone"] = "UTC"; $config["report_order"] = "last_accessed"; $config["show_select_data_source"] = 0; $config["allow_raw_sql"] = 0; @@ -70,6 +71,7 @@ case "title": case "refresh": case "dformat": + case "timezone": case "report_order": case "show_select_data_source": case "allow_show_sql": Index: webfwlog/index.php =================================================================== --- webfwlog/index.php (revision 432) +++ webfwlog/index.php (working copy) @@ -33,6 +33,11 @@ require "include/functions.php"; require "include/state.php"; + if ($version_php[0] > 5 or ($version_php[0] = 5 and $version_php[1] >= 1)) { + if (! ini_get("date.timezone")) + date_default_timezone_set("{$config["timezone"]}"); + } + $source = "db"; if (isset($FWLOG["action"]) and !(strtolower($FWLOG["action"]) == "update cache") and (isset($FWLOG["data_source"]) and strtolower($FWLOG["data_source"]) == "syslog"