<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Werx Limited &#187; client</title>
	<atom:link href="http://werxltd.com/wp/tag/client/feed/" rel="self" type="application/rss+xml" />
	<link>http://werxltd.com/wp</link>
	<description>We make IT work.</description>
	<lastBuildDate>Thu, 29 Jul 2010 19:00:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Browsers, timezones, and Date</title>
		<link>http://werxltd.com/wp/2009/06/05/browsers-timezones-and-date/</link>
		<comments>http://werxltd.com/wp/2009/06/05/browsers-timezones-and-date/#comments</comments>
		<pubDate>Fri, 05 Jun 2009 18:57:39 +0000</pubDate>
		<dc:creator>wes</dc:creator>
				<category><![CDATA[software development]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[client]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[timezones]]></category>
		<category><![CDATA[web 2.0]]></category>

		<guid isPermaLink="false">http://werxltd.com/wp/?p=44</guid>
		<description><![CDATA[Recently I ran across an interesting problem involving dates and timezones while working on a rich web 2.0 application whose primary purpose was to allow the user to enter time values that were then saved, as true date objects, onto the server.]]></description>
			<content:encoded><![CDATA[<p>Recently I ran across an interesting problem involving dates and timezones while working on a rich web 2.0 application whose primary purpose was to allow the user to enter time values that were then saved, as true date objects, onto the server<sup>1</sup>.</p>
<p>Up until now I have not used time values on both a server and client level, I&#8217;d referred instead to use a UNIX timestamp that the server<sup>2</sup> did not touch or, if they did, they did so with the client being the authoritative source.</p>
<p>This case was different in that the server was the authoritative source and all clients were required to deal with time values in the server&#8217;s timezone context<sup>3</sup>.</p>
<p>Herein lies the rub.</p>
<p>For this project we were using ExtJS 2.2.0 and made extensive use of <a href="http://extjs.com/deploy/dev/docs/?class=Date">ExtJS&#8217;s extensions</a> to the regular <a href="http://www.webreference.com/programming/javascript/diaries/15/2.html">Javascript Date object</a>. Little did we know, <a href="http://extjs.com/forum/showthread.php?t=70412">the Date object is implemented per browser</a> and while some browsers<sup>4</sup> will honor timezone designations, other browsers<sup>5</sup> doggedly convert any and all Date objects into the timezone  of the current system they are running on<sup>6</sup>.</p>
<p>While there are some solutions out there like <a href="http://js.fleegix.org/plugins/date/date">Freegix</a> that perport to include solutions for switching timezones on the client-side, we have yet to find any solutions that are truly drop-in replacements.</p>
<p>Why couldn&#8217;t IE just honor the &#8216;T&#8217; or &#8216;O&#8217; designations in the first place? One can only wonder what possessed the IE team when it came to this issue&#8230;</p>
<p>So if you are writing a web 2.0 application that passes dates between the client and server, make sure you remember that the browser has the final say in how your time gets parsed.</p>
<ol class="footnotes"><li id="footnote_0_44" class="footnote">Which, in this case is JBoss and Oracle</li><li id="footnote_1_44" class="footnote">Database or web application tier</li><li id="footnote_2_44" class="footnote">For us, this happened to be Eastern Standard Time</li><li id="footnote_3_44" class="footnote">Such as Chrome and Fire Fox</li><li id="footnote_4_44" class="footnote">Such as, surprise surprise, Internet Explorer 6 and 7</li><li id="footnote_5_44" class="footnote">We tested this by simply adjusting the date/time on our Windows desktops</li></ol>]]></content:encoded>
			<wfw:commentRss>http://werxltd.com/wp/2009/06/05/browsers-timezones-and-date/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
