title: Google Chart: "c.getTimezoneOffset is not a function" error
body: <p>I'm trying to display a line chart of currency rates via google charts. </p>
  
  <p>Basically i have 2 type of values:</p>
  
  <ol>
  <li>Date (format iso8601)</li>
  <li>Rate (decimal number)</li>
  </ol>
  
  <p>When i try to render the chart with Date as type string, it renders nicely.
  But when i try to render the chart with Date as type date/datetime, i get the following error:
  "c.getTimezoneOffset is not a function"  </p>
  
  <p>Here is my code:</p>
  
  <p>PHP array making:</p>
  
  <pre><code>    $arrayForChart =array();
      foreach ($arrayRates as $key =&gt; $value) {
          $dateObj= new datetime($value['date']);//$value['date']= date in iso 8601 format: e.g 2017-02-12 
          $dateStringNewDate="new Date(" . $dateObj-&gt;format('Y') .",". $dateObj-&gt;format('m') . "," . $dateObj-&gt;format('d') . ")";//temp for testing
          $dateStringDate="Date(". $value['date'] . ")";//temp for testing
          array_unshift($arrayForChart, array($dateStringDate , $value['rates']["$toCurrency"]));
      }
      array_unshift($arrayForChart, array(array('label'=&gt;'Date','id'=&gt;'Date','type'=&gt;'date'),array('label'=&gt;'Rate','id'=&gt;'Rate','type'=&gt;'number')));
  </code></pre>
  
  <p>Javascript</p>
  
  <pre><code>function dipsplayChart() {
    //from here google chart stuff
    google.charts.load("current", { packages: ["corechart", "line"] });
    google.charts.setOnLoadCallback(drawLineColors);
  
    function drawLineColors() {
      console.log(JSON.stringify(arrayForChart));
      var data = google.visualization.arrayToDataTable(arrayForChart);
  
      var options = {
        title: baseCurrency + " vs " + toCurrency + " Last 90 days",
        explorer: {
          actions: ["dragToZoom", "rightClickToReset"],
          axis: "horizontal",
          keepInBounds: true
        },
        hAxis: {
          title: "Date"
          //type: "date"
        },
        vAxis: {
          title: "Rate"
          //type: "number"
        },
        colors: ["#a52714", "#097138"]
      };
  
      var chart = new google.visualization.LineChart(
        document.getElementById("chart_div")
      );
      chart.draw(data, options);
    }
    //until here google chart stuff
  }
  </code></pre>
  
  <p>Data example:</p>
  
  <pre><code>[[{"label":"Date","id":"Date","type":"date"},{"label":"Rate","id":"Rate","type":"number"}],["new Date(2017,04,10)",3.6618],["new Date(2017,04,11)",3.6565],["new Date(2017,04,12)",3.6551],["new Date(2017,04,13)",3.6539],["new Date(2017,04,18)",3.6652],["new Date(2017,04,19)",3.6655],["new Date(2017,04,20)",3.6651],["new Date(2017,04,21)",3.6798],["new Date(2017,04,24)",3.6523],["new Date(2017,04,25)",3.6443],["new Date(2017,04,26)",3.6365],["new Date(2017,04,27)",3.644],["new Date(2017,04,28)",3.622],["new Date(2017,05,02)",3.6094],["new Date(2017,05,03)",3.6171],["new Date(2017,05,04)",3.6191],["new Date(2017,05,05)",3.6038],["new Date(2017,05,08)",3.6049],["new Date(2017,05,09)",3.6034],["new Date(2017,05,10)",3.6007],["new Date(2017,05,11)",3.6114],["new Date(2017,05,12)",3.6045],["new Date(2017,05,15)",3.597],["new Date(2017,05,16)",3.6056],["new Date(2017,05,17)",3.6017],["new Date(2017,05,18)",3.6045],["new Date(2017,05,19)",3.5859],["new Date(2017,05,22)",3.5817],["new Date(2017,05,23)",3.5871],["new Date(2017,05,24)",3.5897],["new Date(2017,05,25)",3.5769],["new Date(2017,05,26)",3.5734],["new Date(2017,05,29)",3.5724],["new Date(2017,05,30)",3.5517],["new Date(2017,05,31)",3.5431],["new Date(2017,06,01)",3.5511],["new Date(2017,06,02)",3.5605],["new Date(2017,06,05)",3.549],["new Date(2017,06,06)",3.5461],["new Date(2017,06,07)",3.5457],["new Date(2017,06,08)",3.5358],["new Date(2017,06,09)",3.5242],["new Date(2017,06,12)",3.533],["new Date(2017,06,13)",3.5258],["new Date(2017,06,14)",3.5295],["new Date(2017,06,15)",3.5225],["new Date(2017,06,16)",3.5274],["new Date(2017,06,19)",3.5225],["new Date(2017,06,20)",3.5391],["new Date(2017,06,21)",3.5409],["new Date(2017,06,22)",3.5441],["new Date(2017,06,23)",3.5418],["new Date(2017,06,26)",3.531],["new Date(2017,06,27)",3.5168],["new Date(2017,06,28)",3.52],["new Date(2017,06,29)",3.4955],["new Date(2017,06,30)",3.4953],["new Date(2017,07,03)",3.4979],["new Date(2017,07,04)",3.516],["new Date(2017,07,05)",3.5195],["new Date(2017,07,06)",3.5361]]
  </code></pre>
  
  <p>Anybody know what is the problem?</p>
  
  <p>Many thanks!!</p>