<?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; timezones</title> <atom:link href="http://werxltd.com/wp/tag/timezones/feed/" rel="self" type="application/rss+xml" /><link>http://werxltd.com/wp</link> <description>We make IT work.</description> <lastBuildDate>Mon, 23 Jan 2012 23:03:59 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.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><a
href="http://werxltd.com/wp/2009/06/05/browsers-timezones-and-date/#footnote_0_44" id="identifier_0_44" class="footnote-link footnote-identifier-link" title="Which, in this case is JBoss and Oracle">1</a></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><a
href="http://werxltd.com/wp/2009/06/05/browsers-timezones-and-date/#footnote_1_44" id="identifier_1_44" class="footnote-link footnote-identifier-link" title="Database or web application tier">2</a></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><a
href="http://werxltd.com/wp/2009/06/05/browsers-timezones-and-date/#footnote_2_44" id="identifier_2_44" class="footnote-link footnote-identifier-link" title="For us, this happened to be Eastern Standard Time">3</a></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><a
href="http://werxltd.com/wp/2009/06/05/browsers-timezones-and-date/#footnote_3_44" id="identifier_3_44" class="footnote-link footnote-identifier-link" title="Such as Chrome and Fire Fox">4</a></sup> will honor timezone designations, other browsers<sup><a
href="http://werxltd.com/wp/2009/06/05/browsers-timezones-and-date/#footnote_4_44" id="identifier_4_44" class="footnote-link footnote-identifier-link" title="Such as, surprise surprise, Internet Explorer 6 and 7">5</a></sup> doggedly convert any and all Date objects into the timezone  of the current system they are running on<sup><a
href="http://werxltd.com/wp/2009/06/05/browsers-timezones-and-date/#footnote_5_44" id="identifier_5_44" class="footnote-link footnote-identifier-link" title="We tested this by simply adjusting the date/time on our Windows desktops">6</a></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><div
class="betterrelated none"><p>No related content found.</p></div><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>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using apc
Page Caching using apc
Database Caching 2/10 queries in 0.033 seconds using apc
Object Caching 332/344 objects using apc

Served from: werxltd.com @ 2012-02-08 14:27:18 -->
