<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xml:lang="en">
<title>Andrew Flegg&#039;s Nokia Developer Blog</title> 
<subtitle type="html">A Forum Nokia Blog</subtitle>
 
<updated>2012-02-26T13:35:52+02:00</updated> 
<id>http://www.lifetype.net,1.2/</id>
<link rel="alternate" type="text/html"  hreflang="en" href="http://www.developer.nokia.com/Community/Blogs/blog/andrew-fleggs-nokia-developer-blog" />
 
<rights>Copyright (c) aflegg</rights>
<generator uri="http://www.lifetype.net/" version="1.2">LifeType at Forum Nokia</generator> 
 
<entry> 
<title>Avoiding jet lag using continuous clock change</title>
<link rel="alternate" type="text/html" href="http://www.developer.nokia.com/Community/Blogs/blog/andrew-fleggs-nokia-developer-blog/2012/02/26/avoiding-jet-lag-using-continuous-clock-change" /> 
<id>tag:www.developer.nokia.com,2012-02-26:3627</id>
 
<updated>2012-02-26T13:35:52+02:00</updated> 
<published>2012-02-26T13:35:52+02:00</published> 
<summary type="html"> 
 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.
 
 
Ten hour flights are rarely fun; but ...</summary> 
<author> 
 
<name>aflegg</name> 
<uri>http://www.developer.nokia.com/Community/Blogs/blog/andrew-fleggs-nokia-developer-blog</uri> 
</author> 
<dc:subject>
Business Opportunities/Services 
Location 
Maemo 
MeeGo 
</dc:subject> 
<content type="text/html" xml:lang="en" xml:base="http://www.developer.nokia.com/Community/Blogs/blog/andrew-fleggs-nokia-developer-blog"> 
&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; 
</content> 
</entry> 
 
</feed>