title: H2 FORMATDATETIME() unexpecting changing year on 01/01
body: <p>I'm trying to set the minutes and seconds to 00 in a date, I use formatdatetime(date, 'Y-MM-dd HH:00:00') and it works fine with normal dates, but trying with formatdatetime('2017-01-01 12:27:27', 'Y-MM-dd HH:00:00') the result is 2016-01-01 12:00:00 instead of 2017-01-01 12:00:00.
  Why?</p>
  
  <p>Here is some sample code:</p>
  
  <pre><code>CREATE TABLE test_table (
  timestamp DATETIME(3) NOT NULL
  );
  
  INSERT INTO test_table
  VALUES 
  ('2017-01-01 12:27:27'), 
  ('2017-01-02 12:27:27'), 
  ('2017-01-03 12:27:27');
  
  SELECT FORMATDATETIME(timestamp, 'Y-MM-dd HH:00:00')
  FROM test_table;
  </code></pre>
  
  <p>Result is:</p>
  
  <pre><code>FORMATDATETIME(TIMESTAMP, 'Y-MM-dd HH:00:00')  
  2016-01-01 12:00:00
  2017-01-02 12:00:00
  2017-01-03 12:00:00
  </code></pre>
  
  <p>Why this behaviour?</p>
  
  <p>I tried with H2 1.4.192/JDK 1.7.0_80 and H2 1.4.195/JRE 1.8.0_74.</p>
  
  <p>Output from <code>SELECT timestamp FROM test_table</code> is normal:</p>
  
  <pre><code>TIMESTAMP ▼
  2017-01-01 12:27:27.0
  2017-01-02 12:27:27.0
  2017-01-03 12:27:27.0
  </code></pre>
  
  <p>EDIT:
  I've found the problem, it seems to be the locale:</p>
  
  <p>Output from <code>SELECT FORMATDATETIME(timestamp, 'Y-MM-dd HH:00:00 z', 'it', 'GMT') FROM test_table</code>:</p>
  
  <pre><code>FORMATDATETIME(TIMESTAMP, 'Y-MM-dd HH:00:00 z', 'it')  
  2016-01-01 12:00:00 CET
  2017-01-02 12:00:00 CET
  2017-01-03 12:00:00 CET
  </code></pre>
  
  <p>Output from <code>SELECT FORMATDATETIME(timestamp, 'Y-MM-dd HH:00:00 z', 'en', 'GMT') FROM test_table</code>:</p>
  
  <pre><code>FORMATDATETIME(TIMESTAMP, 'Y-MM-dd HH:00:00 z', 'en')  
  2017-01-01 12:00:00 CET
  2017-01-02 12:00:00 CET
  2017-01-03 12:00:00 CET
  </code></pre>
  
  <p>With <code>it</code> locale it subtract one year at 01/01/2017, while with <code>en</code> locale it doesn't. Can someone explain me why this occurs? Shouldn't locale change only data rapresentation?</p>