// Token: 0x060028B1 RID: 10417 RVA: 0x000129A1 File Offset: 0x00010BA1 private static void smethod_6(Class142 window, Struct26 state) { if (Class142.eventHandler_2 != null) { Class142.eventHandler_2(window, new EventArgs31(state)); } }
internal static bool smethod_12(string string_0, DateParseHandling dateParseHandling_0, DateTimeZoneHandling dateTimeZoneHandling_0, out object object_0) { Struct26 struct2 = new Struct26(); if (!struct2.method_0(string_0)) { object_0 = null; return(false); } DateTime time = new DateTime(struct2.int_0, struct2.int_1, struct2.int_2, struct2.int_3, struct2.int_4, struct2.int_5); time = time.AddTicks((long)struct2.int_6); if (dateParseHandling_0 != DateParseHandling.DateTimeOffset) { long ticks; switch (struct2.enum13_0) { case Enum13.Utc: time = new DateTime(time.Ticks, DateTimeKind.Utc); break; case Enum13.LocalWestOfUtc: { TimeSpan span2 = new TimeSpan(struct2.int_7, struct2.int_8, 0); ticks = time.Ticks + span2.Ticks; if (ticks > DateTime.MaxValue.Ticks) { ticks += time.smethod_0().Ticks; if (ticks > DateTime.MaxValue.Ticks) { ticks = DateTime.MaxValue.Ticks; } time = new DateTime(ticks, DateTimeKind.Local); break; } time = new DateTime(ticks, DateTimeKind.Utc).ToLocalTime(); break; } case Enum13.LocalEastOfUtc: { TimeSpan span3 = new TimeSpan(struct2.int_7, struct2.int_8, 0); ticks = time.Ticks - span3.Ticks; if (ticks < DateTime.MinValue.Ticks) { ticks += time.smethod_0().Ticks; if (ticks < DateTime.MinValue.Ticks) { ticks = DateTime.MinValue.Ticks; } time = new DateTime(ticks, DateTimeKind.Local); break; } time = new DateTime(ticks, DateTimeKind.Utc).ToLocalTime(); break; } } } else { TimeSpan utcOffset; switch (struct2.enum13_0) { case Enum13.Utc: utcOffset = new TimeSpan(0L); break; case Enum13.LocalWestOfUtc: utcOffset = new TimeSpan(-struct2.int_7, -struct2.int_8, 0); break; case Enum13.LocalEastOfUtc: utcOffset = new TimeSpan(struct2.int_7, struct2.int_8, 0); break; default: utcOffset = TimeZoneInfo.Local.GetUtcOffset(time); break; } long num = time.Ticks - utcOffset.Ticks; if ((num >= 0L) && (num <= 0x2bca2875f4373fffL)) { object_0 = new DateTimeOffset(time, utcOffset); return(true); } object_0 = null; return(false); } object_0 = smethod_2(time, dateTimeZoneHandling_0); return(true); }