[SNMP4J] cannot print out date properly

Ronald.Madsen at utstar.com Ronald.Madsen at utstar.com
Fri Sep 2 15:38:58 CEST 2005


I would suspect the MIB object in question (1.3.6.1.2.1.25.6.3.1.5) is
defined with a TimeAndDate display hint, which has a base syntax of OCTET
STRING.

It would be the responsibility of the manager application, using SNMP4J, to
format the OCTET STRING appropriately.

Regards,
Ron





Matthieu Casanova <chocolat.mou at gmail.com>@agentpp.org on 09/02/2005
01:58:22 AM

Sent by:    snmp4j-bounces at agentpp.org


To:    Sam Chen <csam2ca at yahoo.com>
cc:    snmp4j at agentpp.org
Subject:    Re: [SNMP4J] cannot print out date properly


2005/9/2, Sam Chen <csam2ca at yahoo.com>:
>
> Hi,
> When I tried to get the software table and tried to
> print out the result for
> installed_date(1.3.6.1.2.1.25.6.3.1.5) by using the
> following code:
>
> ////////////////////////////////////////////
> VariableBinding[] variables = tableEvent.getColumns();
> String value = variables[3].getVariable().toString();
> system.out.println(value);
> /////////////////////////////////
> and it prints out the value like
> 07:d5:07:15:17:08:20:00
>
> I was expecting values like a date format of string.
> How can I convert that to a string that is in the date
> format?


Are you sure that it is the good variable index ?
Because this looks like a MAC address isn't it ?

Matthieu
_______________________________________________
SNMP4J mailing list
SNMP4J at agentpp.org
 http://lists.agentpp.org/mailman/listinfo/snmp4j







More information about the SNMP4J mailing list