Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SystemDate is displayed with special characters #58

Closed
rjammala opened this issue Dec 10, 2015 · 3 comments
Closed

SystemDate is displayed with special characters #58

rjammala opened this issue Dec 10, 2015 · 3 comments

Comments

@rjammala
Copy link

When I try to get and display the system date using oid: 1.3.6.1.2.1.25.1.2.0, it is displayed with special characters (please see the attachment).

I am using the tip version of go.

$ go version
go version devel +e05b48e Thu Dec 10 08:04:07 2015 +0000 linux/amd64

When I get it through snmpget, I get the normal date:

HOST-RESOURCES-MIB::hrSystemDate.0 = STRING: 2015-12-10,21:39:49.0,+0:0

screen shot 2015-12-10 at 4 56 28 pm

@rjammala
Copy link
Author

I used the following as an example (I changed the oids):

https://github.com/soniah/gosnmp/blob/master/examples/example3.go

@wdreeveii
Copy link
Collaborator

The hrSystemDate is not an ascii formatted date.

You will need to convert the octetstring sequence to the desired format.
Here is a description of the contents of the octetstring.

https://www.webnms.com/snmp/help/snmpapi/snmpv3/using_mibs_in_applns/tcs_dateandtime.html

On Thu, Dec 10, 2015 at 12:59 PM, Rajanikanth Jammalamadaka <
notifications@github.com> wrote:

I used the following as an example (I changed the oids):

https://github.com/soniah/gosnmp/blob/master/examples/example3.go


Reply to this email directly or view it on GitHub
#58 (comment).

Whitham D. Reeve II
907-764-5263

@rjammala
Copy link
Author

Thanks @wdreeveii , closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants