<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet href="http://www.developer.nokia.com/Community/Blogs/styles/rss.css" type="text/css"?>
<rdf:RDF
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
  xmlns:admin="http://webns.net/mvcb/"
  xmlns="http://purl.org/rss/1.0/"
>
 <channel rdf:about="http://www.developer.nokia.com/Community/Blogs/rss.php?blogId=300171&amp;profile=rss10">
  <title>Andrew Flegg&#039;s Nokia Developer Blog</title>
  <link>http://www.developer.nokia.com/Community/Blogs/blog/andrew-fleggs-nokia-developer-blog</link>
  <description>A Forum Nokia Blog</description>
    <dc:creator>aflegg</dc:creator>
  <dc:date>2013-05-26T12:01:52Z</dc:date>
  <admin:generatorAgent rdf:resource="http://www.lifetype.net" />
  <items>
   <rdf:Seq>
       <rdf:li rdf:resource="http://www.developer.nokia.com/Community/Blogs/blog/andrew-fleggs-nokia-developer-blog/2012/02/26/avoiding-jet-lag-using-continuous-clock-change" />
      </rdf:Seq>
  </items> 
 </channel>
  <item rdf:about="http://www.developer.nokia.com/Community/Blogs/blog/andrew-fleggs-nokia-developer-blog/2012/02/26/avoiding-jet-lag-using-continuous-clock-change">
  <title>Avoiding jet lag using continuous clock change</title>
  <link>http://www.developer.nokia.com/Community/Blogs/blog/andrew-fleggs-nokia-developer-blog/2012/02/26/avoiding-jet-lag-using-continuous-clock-change</link>
  <dc:description>&lt;p&gt;
&lt;img src=&quot;http://bleb.org/software/maemo/maeflight.png&quot; width=&quot;80&quot; height=&quot;80&quot; align=&quot;right&quot; /&gt;These days I&#039;m often travelling long distances; whether it&#039;s to Asia or Detroit with work; or San Francisco for the MeeGo and JavaOne Conferences.
&lt;/p&gt;
&lt;p&gt;
Ten hour flights are rarely fun; but when combined with a ten hour time difference? The jet lag can destroy you.
&lt;/p&gt;
&lt;p&gt;
However, I trust a clock when I see it. So if I can convince myself that the time isn&#039;t changing in one big jump, jet lag is less of an issue. I used to do this with my watch: every two hours on a ten hour flight with an eight hour time difference: move my watch forward two hours. By speeding up, or slowing down time, I find it excellent for transitioning gradually to my destination timezone.
&lt;/p&gt;
&lt;p&gt;
My N9&#039;s standby screen provides an opportunity to do this automatically: every time I glance at my phone on the flight, it could show me the right &amp;quot;transient&amp;quot; time. 
&lt;/p&gt;
&lt;p&gt;
I prototyped it with a spreadsheet (&lt;a href=&quot;http://bleb.org/software/maemo/flight-time.ods&quot;&gt;download&lt;/a&gt;), for a recent trip to Korea, to see how effective it would be before writing an app: 
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;&lt;img src=&quot;http://bleb.org/software/maemo/flight-time-1.png&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;
To try it out, first off, &lt;strong&gt;enter&lt;/strong&gt; the local departure and arrival times; and the timezone difference:
&lt;/p&gt;
&lt;p&gt;
&lt;img src=&quot;http://bleb.org/software/maemo/flight-time-2.png&quot; width=&quot;280&quot; height=&quot;61&quot; /&gt; 
&lt;/p&gt;
&lt;p&gt;
If travelling eastwards, the &lt;em&gt;time difference&lt;/em&gt; will be positive. If travelling westwards, it will be negative. 
&lt;/p&gt;
&lt;p&gt;
A shell script will then be shown in column E. &lt;strong&gt;Copy&lt;/strong&gt; this column and &lt;strong&gt;paste&lt;/strong&gt; it into a text editor. &lt;strong&gt;Copy&lt;/strong&gt; the resulting script to your UNIX-based mobile device (N9, N950, N900, N8x0, jailbroken iPad).
&lt;/p&gt;
&lt;p&gt;
On a Harmattan device, the script needs to be run in &lt;strong&gt;&lt;span style=&quot;font-family: courier new,courier&quot;&gt;develsh&lt;/span&gt;&lt;/strong&gt;:
&lt;/p&gt;
&lt;p&gt;
&lt;span style=&quot;font-family: courier new,courier&quot;&gt;~ $ develsh outbound.sh&lt;br /&gt;
...&lt;/span&gt; 
&lt;/p&gt;
&lt;p&gt;
On everything else it needs to be run as &lt;span style=&quot;font-family: courier new,courier&quot;&gt;&lt;strong&gt;root&lt;/strong&gt;&lt;/span&gt;:
&lt;/p&gt;
&lt;p&gt;
&lt;span style=&quot;font-family: courier new,courier&quot;&gt;Jaffas-iPad:~ mobile$ su -&lt;br /&gt;
Password:&lt;br /&gt;
Jaffas-Ipad:~ root# sh outbound.sh&lt;br /&gt;
...&lt;br /&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
If run with &lt;span style=&quot;font-family: courier new,courier&quot;&gt;screen&lt;/span&gt; or &lt;span style=&quot;font-family: courier new,courier&quot;&gt;nohup&lt;/span&gt;, you shouldn&#039;t even need to keep the terminal open.
&lt;/p&gt;
&lt;p&gt;
&lt;span style=&quot;font-size: medium; color: #8a765d&quot;&gt;&lt;strong&gt;NEXT STEPS &lt;/strong&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
Obviously the next step is an app. Is it something you&#039;d be interested in? Is there a nice Qt API for changing the time? Are there Qt APIs for looking up timezones, and setting the device&#039;s timezone? 
&lt;/p&gt;
&lt;p&gt;
&lt;span style=&quot;font-size: xx-small&quot;&gt;&lt;em&gt;Thanks to eipi for allowing me to use &lt;a href=&quot;http://apps.formeego.org/staging/applications/n9/pr1.0/harmattan/Other/maeflight/&quot;&gt;MaeFlight&lt;/a&gt;&#039;s icon in this post.&lt;/em&gt;&lt;/span&gt;
&lt;/p&gt;</dc:description>
      
    <dc:subject>Business Opportunities/Services</dc:subject>
      
    <dc:subject>Location</dc:subject>
      
    <dc:subject>Maemo</dc:subject>
      
    <dc:subject>MeeGo</dc:subject>
     
    
  <dc:date>2012-02-26T13:35:52Z</dc:date>
    <dc:creator>aflegg</dc:creator>
 </item>
 </rdf:RDF>