public static bool IsInvalidTzTimestamp()

in FixAntenna/NetCore/Message/FixTypes.cs [382:424]


		public static bool IsInvalidTzTimestamp(byte[] buffer, int offset, int count)
		{
			// Example:  20060901-07:39Z is 07:39 UTC on 1st of September 2006
			// Example:  20060901-07:39:30.001234Z is 07:39 UTC on 1st of September 2006
			// Example:  20060901-02:39-05 is five hours behind UTC, thus Eastern Time on 1st of September 2006
			// Example:  20060901-15:39+08 is eight hours ahead of UTC, Hong Kong/Singapore time on 1st of September 2006
			// Example:  20060901-15:39:30.123456789+08 is eight hours ahead of UTC, Hong Kong/Singapore time on 1st of September 2006
			// Example:  20060901-13:09+05:30 is 5.5 hours ahead of UTC, India time on 1st of September 2006
			// Example:  20060901-13:09:30+05:30 is 5.5 hours ahead of UTC, India time on 1st of September 2006
			// Example:  20060901-13:09:30.333+05:30 is 5.5 hours ahead of UTC, India time on 1st of September 2006
			if (count != 15 && count != 17 && count != 18 && count != 20 && count != 22 && count != 23 && count != 24 &&
				count != 25 && count != 27 && count != 28 && count != 30 && count != 33)
			{
				return true;
			}

			if (buffer[offset + 8] != (byte)'-' || buffer[offset + 11] != (byte)':')
			{
				return true;
			}

			var year = ParseNumberPart(buffer, offset, offset + 4);
			if (year < 1583)
			{
				return true;
			}

			var month = ParseNumberPart(buffer, offset + 4, offset + 6) - 1;
			if (month < 0 || month > 11)
			{
				return true;
			}

			var date = ParseNumberPart(buffer, offset + 6, offset + 8);
			if (date < 1 || date > (year % 4 == 0 && (year % 100 != 0 || year % 400 == 0)
				? LeapMonthLength[month]
				: MonthLength[month]))
			{
				return true;
			}

			return isInvalidTZTimeOnly(buffer, 9, buffer.Length - 9);
		}