Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ HandleTimeZone()

static bool System.DateTimeParse.HandleTimeZone ( ref __DTString str,
ref DateTimeResult result )
inlinestaticprivate

Definition at line 792 of file DateTimeParse.cs.

793 {
794 if (str.Index < str.Length - 1)
795 {
796 char c = str.Value[str.Index];
797 int num = 0;
798 while (char.IsWhiteSpace(c) && str.Index + num < str.Length - 1)
799 {
800 num++;
801 c = str.Value[str.Index + num];
802 }
803 if (c == '+' || c == '-')
804 {
805 str.Index += num;
806 if ((result.flags & ParseFlags.TimeZoneUsed) != 0)
807 {
808 result.SetBadDateTimeFailure();
809 return false;
810 }
811 result.flags |= ParseFlags.TimeZoneUsed;
812 if (!ParseTimeZone(ref str, ref result.timeZoneOffset))
813 {
814 result.SetBadDateTimeFailure();
815 return false;
816 }
817 }
818 }
819 return true;
820 }
static bool ParseTimeZone(ref __DTString str, ref TimeSpan result)

References System.DateTimeParse.ParseTimeZone(), and System.str.

Referenced by System.DateTimeParse.Lex().