title: Changing the current time zone on Ubuntu with C#/Mono
body: <p>I'm modifying the time zone by replacing the file <code>/etc/locatime</code> by one in <code>/usr/share/zoneinfo</code> in a C#/Mono application, it nearly works.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>Console.WriteLine("a) Current Time zone: {0}", TimeZoneInfo.Local.StandardName);
  Console.WriteLine("a) Now: {0}", DateTime.Now);
  
  // Changing /etc/locatime from CET to PST ...
  
  TimeZoneInfo.ClearCachedData();
  
  Console.WriteLine("b) Current Time zone: {0}", TimeZoneInfo.Local.StandardName);
  Console.WriteLine("b) Now: {0}", DateTime.Now);
  </code></pre>
  
  <p>And here is the ouput: </p>
  
  <pre><code>a) Current Time zone: CET
  a) Now: 10/20/2012 2:00:26 PM
  b) Current Time zone: PST
  b) Now: 10/20/2012 2:00:26 PM
  </code></pre>
  
  <p>As you can see the time zone is correct but <code>DateTime.Now</code>, which should return the local time, doesn't work and returns twice the same value.</p>
  
  <p>Here is the version of mono I'm using: </p>
  
  <pre><code>user@ubuntu:~$ mono -V
  Mono JIT compiler version 2.10.8.1 (Debian 2.10.8.1-1ubuntu2.2)
      TLS:           __thread
      SIGSEGV:       altstack
      Notifications: epoll
      Architecture:  x86
      Disabled:      none
      Misc:          softdebug 
      LLVM:          supported, not enabled.
      GC:            Included Boehm (with typed GC and Parallel Mark)
  </code></pre>
  
  <p>Does someone have an idea about this issue?</p>