File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -649,7 +649,9 @@ public static bool isValidWindowsTimezone(string timezone)
649649
650650 public static string convertUTCOffsetToIanaTzString ( int utcOffset )
651651 {
652+ #if UNITY_2021_1_OR_NEWER
652653 utcOffset = Math . Clamp ( utcOffset , - 12 , 14 ) ;
654+ #endif
653655 if ( utcOffset < 0 )
654656 {
655657 return $ "Etc/GMT+{ Math . Abs ( utcOffset ) } "; // Note the reversed sign for Etc/GMT
@@ -666,7 +668,9 @@ public static string convertUTCOffsetToIanaTzString(int utcOffset)
666668
667669 public static string convertGMTOffsetToIanaTzString ( int gmtOffset )
668670 {
671+ #if UNITY_2021_1_OR_NEWER
669672 gmtOffset = Math . Clamp ( gmtOffset , - 14 , 12 ) ;
673+ #endif
670674 if ( gmtOffset < 0 )
671675 {
672676 return $ "Etc/GMT-{ Math . Abs ( gmtOffset ) } ";
You can’t perform that action at this time.
0 commit comments