[php-blog-cvs] r2505 - in trunk: . docs include/tpl lang lang/UTF-8
A reliable, secure & extensible PHP blog | Not mainstream since 2002
Brought to you by:
garvinhicking,
jhermanns
From: garvinhicking at B. <gar...@ma...> - 2009-05-05 10:27:19
|
Author: garvinhicking Date: 2009-05-05 12:27:08 +0200 (Tue, 05 May 2009) New Revision: 2505 Modified: trunk/docs/NEWS trunk/include/tpl/config_local.inc.php trunk/lang/UTF-8/serendipity_lang_en.inc.php trunk/lang/serendipity_lang_en.inc.php trunk/serendipity_config.inc.php Log: Allow to use UTC timezone offset ,by Abdussamad Modified: trunk/docs/NEWS =================================================================== --- trunk/docs/NEWS 2009-05-04 08:33:50 UTC (rev 2504) +++ trunk/docs/NEWS 2009-05-05 10:27:08 UTC (rev 2505) @@ -3,6 +3,9 @@ Version 1.5 () ------------------------------------------------------------------------ + * Add new config option to base server time on UTC + (http://board.s9y.org/viewtopic.php?f=2&t=15123) (Abdussamad) + * Use a unique session name for each blog instance, so that multiple s9y installations can live on the same domain and having their own sessions (kleinerChemiker, DrNI) Modified: trunk/include/tpl/config_local.inc.php =================================================================== --- trunk/include/tpl/config_local.inc.php 2009-05-04 08:33:50 UTC (rev 2504) +++ trunk/include/tpl/config_local.inc.php 2009-05-05 10:27:08 UTC (rev 2505) @@ -480,8 +480,22 @@ 'type' => 'list', 'default' => array(), 'permission' => 'siteConfiguration', - 'flags' => array('probeDefault')), - + 'flags' => array('probeDefault')) + )); + if(function_exists('date_default_timezone_set')) { + $res['display']['items'][] = array('var' => 'useServerOffset', + 'title' => INSTALL_OFFSET_ON_SERVER_TIME, + 'description' => INSTALL_OFFSET_ON_SERVER_TIME_DESC, + 'type' => 'bool', + 'default' => true, + 'permission' => 'blogConfiguration' + ); + + + + } + + array_push( $res['display']['items'], array('var' => 'serverOffsetHours', 'title' => INSTALL_OFFSET, 'description' => INSTALL_OFFSET_DESC, @@ -502,8 +516,8 @@ 'description' => INSTALL_ACL_DESC, 'type' => 'bool', 'default' => true, - 'permission' => 'blogConfiguration'), - )); + 'permission' => 'blogConfiguration') + ); $res['imagehandling'] = array('title' => INSTALL_CAT_IMAGECONV, Modified: trunk/lang/UTF-8/serendipity_lang_en.inc.php =================================================================== --- trunk/lang/UTF-8/serendipity_lang_en.inc.php 2009-05-04 08:33:50 UTC (rev 2504) +++ trunk/lang/UTF-8/serendipity_lang_en.inc.php 2009-05-05 10:27:08 UTC (rev 2505) @@ -552,6 +552,8 @@ @define('INSTALL', 'Install'); @define('ALREADY_INSTALLED', 'Already installed'); @define('SELECT_A_PLUGIN_TO_ADD', 'Select the plugin which you wish to install'); +@define('INSTALL_OFFSET_ON_SERVER_TIME', 'Base offset on server timezone?'); +@define('INSTALL_OFFSET_ON_SERVER_TIME_DESC', 'Offset entry times on server timezone or not. Select yes to base offset on server timezone and no to offset on GMT.'); @define('INSTALL_OFFSET', 'Server time Offset'); @define('STICKY_POSTINGS', 'Sticky Postings'); @define('INSTALL_FETCHLIMIT', 'Entries to display on frontpage'); Modified: trunk/lang/serendipity_lang_en.inc.php =================================================================== --- trunk/lang/serendipity_lang_en.inc.php 2009-05-04 08:33:50 UTC (rev 2504) +++ trunk/lang/serendipity_lang_en.inc.php 2009-05-05 10:27:08 UTC (rev 2505) @@ -552,6 +552,8 @@ @define('INSTALL', 'Install'); @define('ALREADY_INSTALLED', 'Already installed'); @define('SELECT_A_PLUGIN_TO_ADD', 'Select the plugin which you wish to install'); +@define('INSTALL_OFFSET_ON_SERVER_TIME', 'Base offset on server timezone?'); +@define('INSTALL_OFFSET_ON_SERVER_TIME_DESC', 'Offset entry times on server timezone or not. Select yes to base offset on server timezone and no to offset on GMT.'); @define('INSTALL_OFFSET', 'Server time Offset'); @define('STICKY_POSTINGS', 'Sticky Postings'); @define('INSTALL_FETCHLIMIT', 'Entries to display on frontpage'); Modified: trunk/serendipity_config.inc.php =================================================================== --- trunk/serendipity_config.inc.php 2009-05-04 08:33:50 UTC (rev 2504) +++ trunk/serendipity_config.inc.php 2009-05-05 10:27:08 UTC (rev 2505) @@ -350,7 +350,11 @@ } } } - +if (function_exists('date_default_timezone_set')) { + if(isset($serendipity['useServerOffset']) && $serendipity['useServerOffset']==false) { + date_default_timezone_set('UTC'); + } +} /* * Fallback charset, if none is defined in the language files */ |