Problem in receiving a DateAndTime type object in notification - SNMP

This is a discussion on Problem in receiving a DateAndTime type object in notification - SNMP ; This is a multi-part message in MIME format.
--===============0639730478==
Content-class: urn:content-classes:message
Content-Type: multipart/alternative;
boundary="----_=_NextPart_001_01C8830F.C8858B92"
This is a multi-part message in MIME format.
------_=_NextPart_001_01C8830F.C8858B92
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
=20
Hi,
=20
I'm using Release 5.3.1; and got a problem in ...

I'm using Release 5.3.1; and got a problem in receiving notifications
which includes a DateAndTime type object.=20

=20

The routine send_v2trap(var_list) is called. To build the var_list, the
snmp_varlist_add_variable( ) is called as below:

snmp_varlist_add_variable(&var_list,

=20
notificationEventTime_oid,

=20
OID_LENGTH(notificationEventTime_oid),

ASN_OCTET_STR,

notif->time,

8);

=20

The notf->time is define as char time[12].

=20

It works fine when the hours and minutes are non-zero values. For
example, when notif->time is assigned 0x07, 0xd8, 0x03, 0x0a, 0x0c,
0x0e, 0x0a, 0x0, the notificationEventTime in the notification message
received by manager (MG-SOFT) is: 2008-3-10,12:14:10.0. It's coorect.

=20

However, if the hours =3D 0, {0x07, 0xd8, 0x03, 0x0a, 0x0, 0x0e, 0x0a,
0x0} then the notificationEventTime in the notification message received
by the manager becomes: 2008-3-10,0:0:0.0; i.e., the minutes and seconds
incorrectly become 0, Similar situation happens to the minutes: if
minutes is 0, the seconds incorrectly becomes 0.

face=3DArial>
style=3D'font-size:10.0pt;font-family:Arial'>However, if the hours =3D =
0, {0x07,
0xd8, 0x03, 0x0a, 0x0, 0x0e, 0x0a, 0x0} then the notificationEventTime =
in the
notification message received by the manager becomes: 2008-3-10,0:0:0.0; =
i.e.,
the minutes and seconds incorrectly become 0, Similar situation happens =
to the
minutes: if minutes is 0, the seconds incorrectly becomes =
0.>>

face=3DArial>
style=3D'font-size:10.0pt;font-family:Arial'>> >
nt>

face=3DArial>
style=3D'font-size:10.0pt;font-family:Arial'>I used Ethereal to capture =
the data,
it’s the same as MG-SOFT got.>>