title: Handling time zones in Cocoa
body: <p>I just want to clarify if I am understanding how dates &amp; time zones work.</p>
  
  <p>Basically, I have a date string @"2008-07-06 12:08:49" that I want to convert to an NSDate. I want this date and time to be in whatever the current user's time zone is set in. So if they are in GMT or HST, it's still 12:08:49.</p>
  
  <p>If I have date in unix form 1215382129 (UTC) and my time zone is set to London (GMT), the outputted date from NSLog() is: </p>
  
  <p>2008-07-06 12:08:49 +0100</p>
  
  <p>If I then change my time zone to Hawaii (HST) and output the same date, I get:</p>
  
  <p>2008-07-06 12:08:49 -1000</p>
  
  <p>This seems to work fine, but I was under the impression to get the time in Hawaiian, I'd have to physically add the time difference (-10hrs) to the unix time stamp. Is this not required then?</p>
  
  <p>Does that mean, whatever date and time a unix time is pointing to, it always points to the same date and time in whatever time zone a user is in?</p>
  
  <p>Hope this makes sense!</p>
  
  <p><strong>Edit</strong></p>
  
  <p>I've just realised (thanks to Kevin Conner!) that in fact NSDateFormatter is creating different unix timestamps for that date string depending on the current timezone! So I was totally wrong!! :-)</p>