I just had one question about "Event-Timestamp" AVP.
I know that i should put the epoch time in there, but i mainly concerned about its format, it is what i found in RFC so far:
8.21. Event-Timestamp AVP
The Event-Timestamp (AVP Code 55) is of type Time, and MAY be
included in an Accounting-Request and Accounting-Answer messages to
record the time that the reported event occurred, in seconds since
January 1, 1900 00:00 UTC.
Time
The Time format is derived from the OctetString AVP Base Format.
The string MUST contain four octets, in the same format as the
first four bytes are in the NTP timestamp format. The NTP
Timestamp format is defined in chapter 3 of [SNTP].
This represents the number of seconds since 0h on 1 January 1900
with respect to the Coordinated Universal Time (UTC).
On 6h 28m 16s UTC, 7 February 2036 the time value will overflow.
SNTP [SNTP] describes a procedure to extend the time to 2104.
This procedure MUST be supported by all DIAMETER nodes.
So, the question is should i first get the system current time (in epoch format) and then convert it to string and pass it to Event-Timestamp directly ?
But the standard says: "The string MUST contain four octets
".
I dont know how to achieve this ... could you please elaborate on this ?