title: DateTime.ToLongTimeString() generates different strings
body: <p>I use <code>DateTime.UtcNow.ToLongTimeString()</code> to get the current time string.</p>
  
  <p>However it behaves weird, sometimes it returns time like <code>3:10:00</code> and sometimes like <code>03:10:00</code> (leading zero). Why this happens?</p>
  
  <p>I set a culture on application startup</p>
  
  <pre><code>Thread.CurrentThread.CurrentCulture = new CultureInfo(...);
  Thread.CurrentThread.CurrentUICulture = new CultureInfo(...);
  </code></pre>
  
  <p>And the different result for the time string comes from a Task (from what I can see now). So I create a Task and <code>.Wait()</code> for it to finish. Inside the task the time is converted to string differently.</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>For those who are interested, here is some helpful reading I found:</p>
  
  <p><a href="https://stackoverflow.com/questions/468791/setting-currentculture-and-currentuiculture-of-an-application">Is there a way of setting culture for a whole application? All current threads and new threads?</a><br>
  <a href="http://msdn.microsoft.com/en-us/library/system.globalization.cultureinfo.defaultthreadcurrentculture.aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/system.globalization.cultureinfo.defaultthreadcurrentculture.aspx</a></p>