From f42b358c5317f5ae3fb1d8629636aadfb7678649 Mon Sep 17 00:00:00 2001 From: Zdravko Zdravkin Date: Tue, 30 Jan 2024 14:06:46 +0100 Subject: [PATCH 1/2] support for swift timezone time zone crashing for some swift new zones (example America/Mazatlan) https://github.com/WenchaoD/FSCalendar/issues/1424 --- FSCalendar/FSCalendar.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FSCalendar/FSCalendar.m b/FSCalendar/FSCalendar.m index 6d72810a..ba5ec04c 100644 --- a/FSCalendar/FSCalendar.m +++ b/FSCalendar/FSCalendar.m @@ -152,7 +152,7 @@ - (void)initialize _formatter = [[NSDateFormatter alloc] init]; _formatter.dateFormat = @"yyyy-MM-dd"; _locale = [NSLocale currentLocale]; - _timeZone = [NSTimeZone defaultTimeZone]; + _timeZone = [NSTimeZone timeZoneWithAbbreviation: _timeZone.abbreviation]; _firstWeekday = 1; [self invalidateDateTools]; From 88735b68b266eae1107e5ca8f32f00bd32217d14 Mon Sep 17 00:00:00 2001 From: Zdravko Zdravkin Date: Tue, 30 Jan 2024 14:07:06 +0100 Subject: [PATCH 2/2] Update project.pbxproj --- Example-Objc/FSCalendar.xcodeproj/project.pbxproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Example-Objc/FSCalendar.xcodeproj/project.pbxproj b/Example-Objc/FSCalendar.xcodeproj/project.pbxproj index 8d13c9b0..c0e1547b 100644 --- a/Example-Objc/FSCalendar.xcodeproj/project.pbxproj +++ b/Example-Objc/FSCalendar.xcodeproj/project.pbxproj @@ -141,7 +141,7 @@ 30A495521DCAD9E6000B2F31 /* FSCalendarWeekdayView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FSCalendarWeekdayView.h; sourceTree = ""; }; 30A495531DCAD9E6000B2F31 /* FSCalendarWeekdayView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FSCalendarWeekdayView.m; sourceTree = ""; }; 30B0BABF1B8D8E22004B9476 /* FSCalendar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FSCalendar.h; sourceTree = ""; }; - 30B0BAC01B8D8E22004B9476 /* FSCalendar.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = FSCalendar.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 30B0BAC01B8D8E22004B9476 /* FSCalendar.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = FSCalendar.m; sourceTree = ""; }; 30B0BAC11B8D8E22004B9476 /* FSCalendarAppearance.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FSCalendarAppearance.h; sourceTree = ""; }; 30B0BAC21B8D8E22004B9476 /* FSCalendarAppearance.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FSCalendarAppearance.m; sourceTree = ""; }; 30B0BAC31B8D8E22004B9476 /* FSCalendarCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = FSCalendarCell.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };