title: Converting datetime OctetString to human readable string in GoLang
body: <p>How to convert Datetime Octetstring to ASCII. I read through one of the example in <a href="https://stackoverflow.com/questions/4571899/convert-snmp-octet-string-to-human-readable-date-format">python netsnmp</a> but still not able to solve it.</p>
  
  <p>This is what I received from <a href="https://godoc.org/github.com/soniah/gosnmp" rel="nofollow noreferrer">gosnmp</a> as slice of <code>[]uint8</code></p>
  
  <pre><code>[7 224 1 28 20 5 42 0 43 0 0]
  </code></pre>
  
  <p>or Go-syntax representation of the value</p>
  
  <pre><code>[]byte{0x7, 0xe0, 0x1, 0x1c, 0x14, 0x4, 0x2a, 0x0, 0x2b, 0x0, 0x0}
  </code></pre>
  
  <p>And output in datetime should be something like this:</p>
  
  <pre><code>2015-10-7,17:23:27.0,+0:0
  </code></pre>
  
  <p>here is the mibs:oid: <code>HOST-RESOURCES-MIB::hrSWInstalledDate</code></p>
  
  <p>Can someone give me some idea on how to use <a href="https://golang.org/pkg/encoding/binary/" rel="nofollow noreferrer">binary</a> to decode that into human readable ascii or strings.</p>