title: NSDate and different timezones?
body: <p>Alright. Our application sends an <code>NSString</code> made out of the current user's username and todays date formatted in <code>yyyyMMddHH</code>. Our server, that is located in sweden, makes the exact same <code>String</code> and compares the two when it gets the call. </p>
  
  <p>Now. We have realized, that if one of our users goes abroad, the timezone will change, resulting in complications.</p>
  
  <p>if the iPhone user were to be in lets say, Seoul, South-korea. His <code>NSString</code> that is sent would be something like:</p>
  
  <pre><code>2011061718
  </code></pre>
  
  <p>Meanwhile, when our server gets the call, it will recreate its own datestring in this format because it's located in sweden. </p>
  
  <pre><code>2011061711
  </code></pre>
  
  <p>And therefore deny the user access to the functions on the server side.</p>
  
  <p>To summarize:</p>
  
  <p>How do i programmatically set a default static timezone in my application?</p>
  
  <p>Atm we do this:</p>
  
  <pre><code>NSDate *aDate = [aDateFormatter stringFromDate:[NSDate date]]; 
  </code></pre>
  
  <p>And somehow we need the timezone and compare the difference between the user's actual timezone and change it to a swedish-timezone. </p>
  
  <p>Any ideas? </p>
  
  <p><strong>EDIT:</strong> Ok. This application is only meant to be released in sweden. And we are using a combination of the user's username and the current date in the format of yyyyMMddHH to make a secure key, the key is meant to update itself whenever a new hour starts. The server, which is located in sweden in the timezone of GMT+1 makes a verification that the user is on an actual device using the application and not someone who has made a client of his own making soap-calls to our service. </p>
  
  <p>Therefore, if one of our users goes outside the timezone, it will reject the user since the strings wont match. </p>
  
  <p>This is why we want to set the default timezone for that function GMT+1 at all times. And this is what we're really looking for. </p>
  
  <p>Thanks. Again.</p>