0

Some countries are observing daylight saving, so I want to know if daylight setting is currently turned on or off (TRUE or FALSE) on the iDevice then I could correct the date on my app. is that possible?

Larme
  • 24,190
  • 6
  • 51
  • 81
user3517855
  • 211
  • 1
  • 3
  • 12
  • Can you elaborate this: `correct the date on my app`. Since `NSDate` is a simply a point in time without any time zone, users will see that date in their time zone, which is the expected behavior in most cases. – Desdenova Apr 18 '14 at 11:26

1 Answers1

4

Query the current NSCalendars timeZone to see if it is currently in daylight saving time.

BOOL dst = [[[NSCalendar currentCalendar] timeZone] isDaylightSavingTime];
Rich
  • 8,108
  • 5
  • 46
  • 59