title: Convert interface to int64 does not work as expected
body: <p>I am trying to write a method to convert epoch timestamps to <code>int64</code> values, but the method may get multiple data types; e.g. <code>int64</code>, <code>int</code>, <code>string</code>. I have following piece of code for it:</p>
  <pre><code>package main
  
  import (
      &quot;fmt&quot;
  )
  
  func test(t interface{}) {
      tInt64, ok := t.(int64)
      fmt.Println(&quot;initial value:&quot;, t)
      fmt.Printf(&quot;initial type: %T\n&quot;, t)
      fmt.Println(&quot;casting status:&quot;, ok)
      fmt.Println(&quot;converted:&quot;, tInt64)
  }
  
  func main() {
      t := 1606800000
      tStr := &quot;1606800000&quot;
  
      test(t)
      test(tStr)
  
  }
  </code></pre>
  <p>I expect it to successfully convert both <code>t</code> and <code>tStr</code> variables to <code>int64</code>; but, here's the result:</p>
  <pre><code>initial value: 1606800000
  initial type: int
  casting status: false
  converted: 0
  initial value: 1606800000
  initial type: string
  casting status: false
  converted: 0
  </code></pre>
  <p>I don't know if it's related or not; but I executed the code with three version of golang compiler: <code>1.13</code>, <code>1.14</code> and <code>1.15</code>. All had same output.</p>