title: NodaTime - Errors after time switch
body: <p>Yesterday Uruguay changed their clocks, and now I keep seeing exceptions when converting specific times for their timezone:</p>
  
  <pre><code>ERROR   Exception: - DateTime ConvertTimeToUtc(DateTime, String)    (05/10/2014 02:31:00, America/Montevideo)
  NodaTime.SkippedTimeException: Specified argument was out of the range of valid values.
  Parameter name: Local time 05/10/2014 02:31:00 is invalid in time zone America/Montevideo
  </code></pre>
  
  <p>I understand how a local time can be invalid:</p>
  
  <p><em>"For example, suppose the time zone goes forward at 2am, so the second after 01:59:59 becomes 03:00:00. In that case, local times such as 02:30:00 never occur."</em></p>
  
  <p>However, what I don't understand (and I probably need more coffee), is why NodaTime is not accounting for this? Should it not be aware that 02:31 is now an invalid local time - or should I be doing additional handling to account for this?</p>
  
  <p>Functions I'm calling:</p>
  
  <pre><code>var timeZone = DateTimeZoneProviders.Tzdb[timezoneName];
  var localTime = LocalDateTime.FromDateTime(timeToConvert).InZoneStrictly(timeZone);;
  return DateTime.SpecifyKind(localTime.ToDateTimeUtc(), DateTimeKind.Utc);  
  </code></pre>