(string expirationTime)
| 370 | } |
| 371 | |
| 372 | private static DateTime? ConvertExpirationTime(string expirationTime) |
| 373 | { |
| 374 | DateTime? expires = null; |
| 375 | if (double.TryParse(expirationTime, NumberStyles.Number, CultureInfo.InvariantCulture, out double seconds)) |
| 376 | { |
| 377 | try |
| 378 | { |
| 379 | expires = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddSeconds(seconds).ToLocalTime(); |
| 380 | } |
| 381 | catch (ArgumentOutOfRangeException) |
| 382 | { |
| 383 | expires = DateTime.MaxValue.ToLocalTime(); |
| 384 | } |
| 385 | } |
| 386 | |
| 387 | return expires; |
| 388 | } |
| 389 | } |
nothing calls this directly
no outgoing calls
no test coverage detected