<?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>Software development in the real world &#187; development</title>
	<atom:link href="http://realitydrivendeveloper.com/category/development/feed/" rel="self" type="application/rss+xml" />
	<link>http://realitydrivendeveloper.com</link>
	<description></description>
	<lastBuildDate>Sat, 15 May 2010 02:44:53 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>WorldTimeEngine: How to show all times in user&#8217;s local time zone</title>
		<link>http://realitydrivendeveloper.com/2009/08/worldtimeengine-how-to-show-all-times-in-users-local-time-zone/</link>
		<comments>http://realitydrivendeveloper.com/2009/08/worldtimeengine-how-to-show-all-times-in-users-local-time-zone/#comments</comments>
		<pubDate>Sat, 15 Aug 2009 07:24:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[worldtimeengine]]></category>

		<guid isPermaLink="false">http://realitydrivendeveloper.com/?p=102</guid>
		<description><![CDATA[When I visit some site and it shows me that some action performed at some time &#8211; it confuses me a little, because I don&#8217;t know in which time zone is this time.
Sure, you can spend some time to read about one&#8217;s time zone settings and rules, BUT Don&#8217;t make me think. Every website uses [...]]]></description>
			<content:encoded><![CDATA[<p>When I visit some site and it shows me that some action performed at some time &#8211; it confuses me a little, because I don&#8217;t know in which time zone is this time.<br />
Sure, you can spend some time to read about one&#8217;s time zone settings and rules, BUT <strong><a href="http://en.wikipedia.org/wiki/Don't_Make_Me_Think">Don&#8217;t make me think</a></strong>. Every website uses his own rules for time setting &#8211; some uses <strong>GMT zone</strong>, some says something like: London or New York or Moscow time.</p>
<p>I, as a potential user, will be much more satisfied if I would see the only one explanation:<br />
<blockquote>All dates and times are in your local time zone settings.</p></blockquote>
<p>Sounds easy, yet powerful. And on the other hand &#8211; hard to implement such flexibility.. But it&#8217;s really not.</p>
<p><span id="more-102"></span></p>
<p>Recently, I was working on some site, where exact clear time was essential. It was scheduled message sending feature. We had users from many countries in great variety of time zones.<br />
My first idea about how this feature can be implemented &#8211; was in involvement of time zones select option, where user can choose his time zone to say to us his local time. But this isn&#8217;t very reliable because in one particular GMT time zone many can be located lots of countries with their own time setting rules.</p>
<p>Every single country decides every year when DST transitions will occur.  There can be any number of offset transitions during the year: 0, 1, 2, 3, 4 etc. There can be offset transitions that aren&#8217;t DST transitions.  For example, in 1946 Hawaii changed its standard time offset from -10.5 hours to -10 hours&#8211;and this had nothing to do with DST.  </p>
<p>So we couldn&#8217;t count neither on GMT zone to be sure for 100%, nor for country&#8217;s capital GMT offset(Russia, USA, Canada and so on).</p>
<p>The answer was very simple and beautiful.</p>
<p>There is <b><a href="http://worldtimeengine.com">WorldTimeEngine</a></b> service, which provides a simple <b>API</b> for retrieving user&#8217;s local time based on his IP address. It costs not so much, and this information can be cached for quite a long period of time.</p>
<p>I&#8217;ve written some simple class, which calculates offset between our server&#8217;s time(London, GMT+0) and user&#8217;s local time, then it saves this offset to the IP address &#8211; Offset dictionary stored in database. So, when we show some time-related information, we implement this offset for every single timestamp &#8211; and user always see all info in his local time settings.</p>
<p><strong>Very useful.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://realitydrivendeveloper.com/2009/08/worldtimeengine-how-to-show-all-times-in-users-local-time-zone/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
