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
  • 22,070
  • 5
  • 50
  • 76
user3517855
  • 201
  • 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
  • 7,981
  • 5
  • 43
  • 57