Пример #1
0
    // Token: 0x060005E2 RID: 1506 RVA: 0x000294B0 File Offset: 0x000276B0
    private static bool smethod_19(Struct8 struct8_0, out long long_1, out TimeSpan timeSpan_0, out DateTimeKind dateTimeKind_0)
    {
        dateTimeKind_0 = DateTimeKind.Utc;
        int num = struct8_0.smethod_0('+', 7, struct8_0.method_2() - 8);

        if (num == -1)
        {
            num = struct8_0.smethod_0('-', 7, struct8_0.method_2() - 8);
        }
        if (num != -1)
        {
            dateTimeKind_0 = DateTimeKind.Local;
            if (!Class25.smethod_23(struct8_0, num + struct8_0.method_1(), out timeSpan_0))
            {
                long_1 = 0L;
                return(false);
            }
        }
        else
        {
            timeSpan_0 = TimeSpan.Zero;
            num        = struct8_0.method_2() - 2;
        }
        return(Class23.smethod_15(struct8_0.method_0(), 6 + struct8_0.method_1(), num - 6, out long_1) == (Enum4)1);
    }
Пример #2
0
    // Token: 0x060005DB RID: 1499 RVA: 0x00028E4C File Offset: 0x0002704C
    internal static bool smethod_12(Struct8 struct8_0, DateTimeZoneHandling dateTimeZoneHandling_0, out DateTime dateTime_0)
    {
        Struct5 @struct = default(Struct5);

        if ([email protected]_0(struct8_0.method_0(), struct8_0.method_1(), struct8_0.method_2()))
        {
            dateTime_0 = default(DateTime);
            return(false);
        }
        DateTime dateTime_ = Class25.smethod_14(@struct);

        switch (@struct.enum6_0)
        {
        case (Enum6)1:
            dateTime_ = new DateTime(dateTime_.Ticks, DateTimeKind.Utc);
            break;

        case (Enum6)2:
        {
            TimeSpan timeSpan = new TimeSpan(@struct.int_7, @struct.int_8, 0);
            long     num      = dateTime_.Ticks + timeSpan.Ticks;
            if (num <= DateTime.MaxValue.Ticks)
            {
                dateTime_ = new DateTime(num, DateTimeKind.Utc).ToLocalTime();
            }
            else
            {
                num += dateTime_.smethod_0().Ticks;
                if (num > DateTime.MaxValue.Ticks)
                {
                    num = DateTime.MaxValue.Ticks;
                }
                dateTime_ = new DateTime(num, DateTimeKind.Local);
            }
            break;
        }

        case (Enum6)3:
        {
            TimeSpan timeSpan2 = new TimeSpan(@struct.int_7, @struct.int_8, 0);
            long     num       = dateTime_.Ticks - timeSpan2.Ticks;
            if (num >= DateTime.MinValue.Ticks)
            {
                dateTime_ = new DateTime(num, DateTimeKind.Utc).ToLocalTime();
            }
            else
            {
                num += dateTime_.smethod_0().Ticks;
                if (num < DateTime.MinValue.Ticks)
                {
                    num = DateTime.MinValue.Ticks;
                }
                dateTime_ = new DateTime(num, DateTimeKind.Local);
            }
            break;
        }
        }
        dateTime_0 = Class25.smethod_2(dateTime_, dateTimeZoneHandling_0);
        return(true);
    }
Пример #3
0
    // Token: 0x060005DC RID: 1500 RVA: 0x00028FE0 File Offset: 0x000271E0
    internal static bool smethod_13(Struct8 struct8_0, out DateTimeOffset dateTimeOffset_0)
    {
        Struct5 @struct = default(Struct5);

        if ([email protected]_0(struct8_0.method_0(), struct8_0.method_1(), struct8_0.method_2()))
        {
            dateTimeOffset_0 = default(DateTimeOffset);
            return(false);
        }
        DateTime dateTime = Class25.smethod_14(@struct);
        TimeSpan utcOffset;

        switch (@struct.enum6_0)
        {
        case (Enum6)1:
            utcOffset = new TimeSpan(0L);
            break;

        case (Enum6)2:
            utcOffset = new TimeSpan([email protected]_7, [email protected]_8, 0);
            break;

        case (Enum6)3:
            utcOffset = new TimeSpan(@struct.int_7, @struct.int_8, 0);
            break;

        default:
            utcOffset = TimeZoneInfo.Local.GetUtcOffset(dateTime);
            break;
        }
        long num = dateTime.Ticks - utcOffset.Ticks;

        if (num >= 0L && num <= 3155378975999999999L)
        {
            dateTimeOffset_0 = new DateTimeOffset(dateTime, utcOffset);
            return(true);
        }
        dateTimeOffset_0 = default(DateTimeOffset);
        return(false);
    }
Пример #4
0
 // Token: 0x060005E0 RID: 1504 RVA: 0x000292FC File Offset: 0x000274FC
 internal static bool smethod_17(Struct8 struct8_0, string string_0, IFormatProvider iformatProvider_0, out DateTimeOffset dateTimeOffset_0)
 {
     if (struct8_0.method_2() > 0)
     {
         int num = struct8_0.method_1();
         if (struct8_0[num] == '/')
         {
             if (struct8_0.method_2() >= 9 && struct8_0.smethod_1("/Date(") && struct8_0.smethod_2(")/") && Class25.smethod_21(struct8_0, out dateTimeOffset_0))
             {
                 return(true);
             }
         }
         else if (struct8_0.method_2() >= 19 && struct8_0.method_2() <= 40 && char.IsDigit(struct8_0[num]) && struct8_0[num + 10] == 'T' && Class25.smethod_13(struct8_0, out dateTimeOffset_0))
         {
             return(true);
         }
         if (!string.IsNullOrEmpty(string_0) && Class25.smethod_22(struct8_0.ToString(), string_0, iformatProvider_0, out dateTimeOffset_0))
         {
             return(true);
         }
     }
     dateTimeOffset_0 = default(DateTimeOffset);
     return(false);
 }
Пример #5
0
 // Token: 0x060005DE RID: 1502 RVA: 0x00029140 File Offset: 0x00027340
 internal static bool smethod_15(Struct8 struct8_0, DateTimeZoneHandling dateTimeZoneHandling_0, string string_0, IFormatProvider iformatProvider_0, out DateTime dateTime_0)
 {
     if (struct8_0.method_2() > 0)
     {
         int num = struct8_0.method_1();
         if (struct8_0[num] == '/')
         {
             if (struct8_0.method_2() >= 9 && struct8_0.smethod_1("/Date(") && struct8_0.smethod_2(")/") && Class25.xkTsxUkKek(struct8_0, dateTimeZoneHandling_0, out dateTime_0))
             {
                 return(true);
             }
         }
         else if (struct8_0.method_2() >= 19 && struct8_0.method_2() <= 40 && char.IsDigit(struct8_0[num]) && struct8_0[num + 10] == 'T' && Class25.smethod_12(struct8_0, dateTimeZoneHandling_0, out dateTime_0))
         {
             return(true);
         }
         if (!string.IsNullOrEmpty(string_0) && Class25.smethod_20(struct8_0.ToString(), dateTimeZoneHandling_0, string_0, iformatProvider_0, out dateTime_0))
         {
             return(true);
         }
     }
     dateTime_0 = default(DateTime);
     return(false);
 }