title: Swift - Date change Timezone
body: <p>I'm using firebase to show to the user, the workout of the day.
  The function is simple:</p>
  
  <pre><code>REF_LEADERBOARD.document(gymID).collection("resultsWorkout").whereField("date", isEqualTo: someDateTime).getDocuments { (querySnapshot, err) in
        if let err = err {
              print("Error getting documents: \(err)")
           } else {
              for document in querySnapshot!.documents {
                 // show workout
              }
           }
        }
  </code></pre>
  
  <p>with someDateTime defined like that:</p>
  
  <pre><code>let calendar = Calendar.current
  let day = calendar.component(.day, from: date)
  let month = calendar.component(.month, from: date)
  let year = calendar.component(.year, from: date)
  
  let dateShow = "\(year)/\(month)/\(day)"
  
  let formatter = DateFormatter()
  formatter.dateFormat = "yyyy/MM/dd HH:mm"
  let someDateTime = formatter.date(from: "\(dateShow) 00:00")
  </code></pre>
  
  <p>This function is working perfeclty in the USA, but not in France for example.
  I think the problem come from the <code>UTC</code>:</p>
  
  <p><a href="https://i.stack.imgur.com/9mR3S.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9mR3S.png" alt="enter image description here"></a></p>
  
  <p>I France the <code>UTC</code> is not -7 and this function show "no results"...</p>
  
  <p>Do you know how I could do to have a code working for every country in the world?</p>