How to do so with NSDate?
All NSDate give is the GMT time. I want my time. I want the time my users see on their watch.
I want to display different pictures based on what time of the day it is.
How would I accomplish this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use
NSCalendarandNSDateComponents. The following code shows how to get the current hour and minute in your local timezone: