title: Get beginning of the day by given date in Swift
body: <p>I have an todo application and some tasks have deadlines. If deadline is bigger or equal than current date, I want to display them. However, there is a local datetime problem i believe.</p>
  <p>This is the current date using 'print(Date())':
  2021-07-27 18:53:03 +0000</p>
  <p>This is the beginning of that date using 'print(Calendar.current.startOfDay(for: Date()))':
  2021-07-26 21:00:00 +0000</p>
  <p>As you see, 27th day becomes 26th. I tried timezone operations also. It seems true but day is still starting at 21.00</p>
  <p>When I convert them as string and print them, it is ok it show the expected results but without string type it becomes like above. Because of I want to get the bigger or equal days compared to current date , string solution is not working. It is the 27th of day but because of date object it is shown as 26th day and my app showing yesterdays tasks etc.</p>
  <p>Can you provide a help for me?</p>
  <p>Thanks</p>