<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[FrontAccounting forum — Time Zone error]]></title>
		<link>https://frontaccounting.com/punbb/viewtopic.php?id=8234</link>
		<atom:link href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=8234&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Time Zone error.]]></description>
		<lastBuildDate>Sun, 10 Jan 2021 08:49:09 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Time Zone error]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=38903#p38903</link>
			<description><![CDATA[<p>Hello:<br />For me, in ubuntu worked editing&nbsp; php.ini in /etc/php/7.4/apache2/ with nano or gedit (I&#039;m on php 7.4)<br />First make a copy of your php.ini, then:</p><p>sudo gedit /etc/php/7.4/apache2/php.ini</p><p>find:<br />;date.timezone = </p><p>replace it with:<br />date.timezone = &#039;YourContinent/YourCity&#039; (and no &quot;;&quot; at start&nbsp; <img src="https://frontaccounting.com/punbb/img/smilies/wink.png" width="15" height="15" alt="wink" /> )</p><p>Example:<br />date.timezone = &#039;America/Santiago&#039; </p><p>Save, exit.</p><br /><p>restart apache2:<br />sudo systemctl restart apache2</p><p>Saludos<br />Victor R.</p>]]></description>
			<author><![CDATA[null@example.com (Caribe95)]]></author>
			<pubDate>Sun, 10 Jan 2021 08:49:09 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=38903#p38903</guid>
		</item>
		<item>
			<title><![CDATA[Time Zone error]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=35277#p35277</link>
			<description><![CDATA[<p>The default <strong>time_zone</strong> is defined in the <strong>sys_prefs</strong> table.<br />It is also conditionally set as a <strong>php.ini</strong> variable in the <strong>config.php</strong> file.</p><p>The order of Timezone precedence in the <strong>includes/prefs/sysprefs.inc</strong> is in lines 33 to 45:<br /></p><div class="codebox"><pre><code>        foreach(get_defined_vars() as $name =&gt; $value)
            $this-&gt;$name = $value;

        if (!@$this-&gt;time_zone)
            $this-&gt;time_zone = ini_get(&#039;date.timezone&#039;);

        if (!$this-&gt;time_zone)
            $this-&gt;time_zone = &#039;Europe/Berlin&#039;;
            
        if (!isset($this-&gt;use_popup_search))
            $this-&gt;use_popup_search = false;

           ini_set(&#039;date.timezone&#039;, $this-&gt;time_zone);</code></pre></div><p>This does not respect the <strong>php.ini</strong>&#039;s value (or its&#039; scripted set value from the <strong>config.php</strong>) and in actuality gets overwritten by the <strong>&#039;Europe/Berlin&#039;</strong> fallback value and reflects in the footer timestamp displayed in the FA pages even after login whence a <em>current_user</em> is available in the session variable.</p><p>The solution is to make an unconditional setting in the <strong>config.</strong>(<em>config.default.php</em>) file by replacing lines 25-26:<br /></p><div class="codebox"><pre><code>    if (!ini_get(&#039;date.timezone&#039;))
        ini_set(&#039;date.timezone&#039;, &#039;Europe/Berlin&#039;);</code></pre></div><p>with<br /></p><div class="codebox"><pre><code>    ini_set(&#039;date.timezone&#039;, &#039;Europe/Berlin&#039;);</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Fri, 21 Jun 2019 12:08:28 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=35277#p35277</guid>
		</item>
	</channel>
</rss>
