On Dec 18, 2019, at 12:31 PM, Jean-Daniel via Cocoa-dev <cocoa-dev@lists.apple.com> wrote: > > >> Le 18 déc. 2019 à 18:25, Steve Mills via Cocoa-dev >> <cocoa-dev@lists.apple.com> a écrit : >> >>> On Dec 18, 2019, at 11:19, Carl Hoefs via Cocoa-dev >>> <cocoa-dev@lists.apple.com> wrote: >>> >>> I have a macOS daemon that uses NSTimers for scheduling user event >>> reminders. >>> >>> This works well except for abrupt time changes: >>> (1) the user explicitly changes the date/time >>> (2) the user crosses into a different time zone >>> (3) daylight saving time comes/goes. >>> Then I need to recalculate the timers based on the new current time. >>> >>> The Apple docs don't list any NSWorkspace notifications related to the >>> above. >>> How can I handle these cases? >> >> Look in a different header, one related to time; NSDate.h, where you’ll find >> NSSystemClockDidChangeNotification. >> >> Steve via iPhone > > > Note that 2 and 3 are not time change from the system point of view. The > system clock don’t change in such cases. > > You may have some luck with NSSystemTimeZoneDidChangeNotification though (as > daylight saving time is usually considered a change of timezone).
Didn't know about NSSystemTimeZoneDidChangeNotification, but I get no notification with it either. -Carl _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com