title: MySQL: setting time_zone in my.cnf options file
body: <p>In MySQL you can set a session variable called <strong>time_zone</strong> to change the timezone. This is useful e.g. when looking at timestamps from another country. Here is an example:</p>
  
  <pre><code>mysql&gt; select now();
  +---------------------+
  | now()               |
  +---------------------+
  | 2010-12-30 18:59:18 |
  +---------------------+
  1 row in set (0.00 sec)
  
  mysql&gt; set time_zone='Brazil/East';
  Query OK, 0 rows affected (0.00 sec)
  
  mysql&gt; select now();
  +---------------------+
  | now()               |
  +---------------------+
  | 2010-12-30 09:59:29 |
  +---------------------+
  1 row in set (0.00 sec)
  </code></pre>
  
  <p>Is it possible to put that in an option file e.g. .my.cnf ?</p>
  
  <p>When I try, it doesn't work. All I get is:</p>
  
  <blockquote>
  <pre><code>mysql: unknown variable 'time_zone=Brazil/East'
  </code></pre>
  </blockquote>