private static TryReadOffset ( Newtonsoft.Json.Utilities.StringReference offsetText, int startIndex, System.TimeSpan &offset ) : bool | ||
offsetText | Newtonsoft.Json.Utilities.StringReference | |
startIndex | int | |
offset | System.TimeSpan | |
리턴 | bool |
private static bool TryParseMicrosoftDate( StringReference text, out long ticks, out TimeSpan offset, out DateTimeKind kind) { kind = DateTimeKind.Utc; int num = text.IndexOf('+', 7, text.Length - 8); if (num == -1) { num = text.IndexOf('-', 7, text.Length - 8); } if (num != -1) { kind = DateTimeKind.Local; if (!DateTimeUtils.TryReadOffset(text, num + text.StartIndex, out offset)) { ticks = 0L; return(false); } } else { offset = TimeSpan.Zero; num = text.Length - 2; } return(ConvertUtils.Int64TryParse(text.Chars, 6 + text.StartIndex, num - 6, out ticks) == ParseResult.Success); }