<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:series="http://unfoldingneurons.com/"
		>
<channel>
	<title>Comments on: Zend_Db: Setting MySQL&#039;s timezone per connection</title>
	<atom:link href="http://marcuswelz.com/2008/09/16/zend_db-setting-mysqls-timezone-per-connection/feed/" rel="self" type="application/rss+xml" />
	<link>http://marcuswelz.com/2008/09/16/zend_db-setting-mysqls-timezone-per-connection/</link>
	<description>software imagineer</description>
	<lastBuildDate>Fri, 27 Jan 2012 05:04:46 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Zend_Db timezone definition after connection to MySQL &#124; whyte624 &#8211; Andrey S &#8211; Personal site</title>
		<link>http://marcuswelz.com/2008/09/16/zend_db-setting-mysqls-timezone-per-connection/comment-page-1/#comment-40467</link>
		<dc:creator>Zend_Db timezone definition after connection to MySQL &#124; whyte624 &#8211; Andrey S &#8211; Personal site</dc:creator>
		<pubDate>Fri, 27 Jan 2012 05:04:46 +0000</pubDate>
		<guid isPermaLink="false">http://marcuswelz.com/?p=230#comment-40467</guid>
		<description>[...] found other solution in this blog. So in other words if you using mysqli adapter for Zend_Db, we can set timezone in configuration [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] found other solution in this blog. So in other words if you using mysqli adapter for Zend_Db, we can set timezone in configuration [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrey</title>
		<link>http://marcuswelz.com/2008/09/16/zend_db-setting-mysqls-timezone-per-connection/comment-page-1/#comment-40463</link>
		<dc:creator>Andrey</dc:creator>
		<pubDate>Fri, 27 Jan 2012 04:42:27 +0000</pubDate>
		<guid isPermaLink="false">http://marcuswelz.com/?p=230#comment-40463</guid>
		<description>Thanks, Dominic!
Very interesting!</description>
		<content:encoded><![CDATA[<p>Thanks, Dominic!<br />
Very interesting!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John D</title>
		<link>http://marcuswelz.com/2008/09/16/zend_db-setting-mysqls-timezone-per-connection/comment-page-1/#comment-25424</link>
		<dc:creator>John D</dc:creator>
		<pubDate>Mon, 19 Sep 2011 21:57:10 +0000</pubDate>
		<guid isPermaLink="false">http://marcuswelz.com/?p=230#comment-25424</guid>
		<description>Is there a PostgreSQL equivalent of this?</description>
		<content:encoded><![CDATA[<p>Is there a PostgreSQL equivalent of this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lachlan</title>
		<link>http://marcuswelz.com/2008/09/16/zend_db-setting-mysqls-timezone-per-connection/comment-page-1/#comment-15420</link>
		<dc:creator>Lachlan</dc:creator>
		<pubDate>Mon, 11 Jul 2011 18:43:33 +0000</pubDate>
		<guid isPermaLink="false">http://marcuswelz.com/?p=230#comment-15420</guid>
		<description>Won&#039;t this break for timezones with non-whole numbers? Try for instance Pacific/Chatham. It should be +10.45.

I used this:

$minutes = $timezone-&gt;getOffset(new DateTime(&#039;NOW&#039;)) / 60;
$offset = sprintf(&quot;SET time_zone = &#039;%d:%2d&#039;&quot;, $minutes / 60, $minutes % 60);</description>
		<content:encoded><![CDATA[<p>Won't this break for timezones with non-whole numbers? Try for instance Pacific/Chatham. It should be +10.45.</p>
<p>I used this:</p>
<p>$minutes = $timezone-&gt;getOffset(new DateTime('NOW')) / 60;<br />
$offset = sprintf("SET time_zone = '%d:%2d'", $minutes / 60, $minutes % 60);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: marcus</title>
		<link>http://marcuswelz.com/2008/09/16/zend_db-setting-mysqls-timezone-per-connection/comment-page-1/#comment-5599</link>
		<dc:creator>marcus</dc:creator>
		<pubDate>Tue, 19 Oct 2010 00:53:40 +0000</pubDate>
		<guid isPermaLink="false">http://marcuswelz.com/?p=230#comment-5599</guid>
		<description>Dominik, indeed recent versions of Zend Framework support this out of the box. That wasn&#039;t the case two years ago. ;-)</description>
		<content:encoded><![CDATA[<p>Dominik, indeed recent versions of Zend Framework support this out of the box. That wasn't the case two years ago. <img src='http://marcuswelz.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dominik</title>
		<link>http://marcuswelz.com/2008/09/16/zend_db-setting-mysqls-timezone-per-connection/comment-page-1/#comment-5547</link>
		<dc:creator>Dominik</dc:creator>
		<pubDate>Mon, 27 Sep 2010 13:30:16 +0000</pubDate>
		<guid isPermaLink="false">http://marcuswelz.com/?p=230#comment-5547</guid>
		<description>Hi Marcus

I ran into the very same problem and was lucky to find your howto on this topic. While reading documentations on the MySQL and ZF websites I found out that it is possible to pass driver options which allow the setting of the timezone. A simple entry like 

database.params.driver_options.MYSQLI_INIT_COMMAND = &quot;set time_zone = &#039;+2:00&#039;&quot;

in the config will handle the setting of the timezone as wished. This works with the current ZF version 1.10.8.

Thanks and Greetings
Dominik</description>
		<content:encoded><![CDATA[<p>Hi Marcus</p>
<p>I ran into the very same problem and was lucky to find your howto on this topic. While reading documentations on the MySQL and ZF websites I found out that it is possible to pass driver options which allow the setting of the timezone. A simple entry like </p>
<p>database.params.driver_options.MYSQLI_INIT_COMMAND = "set time_zone = '+2:00'"</p>
<p>in the config will handle the setting of the timezone as wished. This works with the current ZF version 1.10.8.</p>
<p>Thanks and Greetings<br />
Dominik</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 55/88 queries in 0.122 seconds using disk: basic

Served from: marcuswelz.com @ 2012-02-08 07:37:04 -->
