Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[testbed/datasenders] add missing 0 to nanoseconds calculation (#33321)
**Description:** <Describe what has changed.> Fixing a bug - the calculation when converting pdata timestamps to `time` is off in both the `syslog` and `tcpudp` datasenders. Seconds are calculated correctly by dividing the timestamp by `10^9`, but in nanosecond calculation the remainder of `timestamp/10^8` is used, effectively always setting the first decimal in the resulting timestamp to `0`. Discovered this while writing some tests against the syslog receiver and receiving unexpected data in the log body, after identifying the issue a quick search revealed that the same thing was happening in the tcp/upd datasender. **Example:** `2024-05-31T11:53:54.612287004+02:00` becomes `2024-05-31T11:53:54.012287004+02:00` **Link to tracking Issue:** no issue as it's a fairly minor thing that only affects tests, but can open if required **Testing:** - manual tests - existing tests **Documentation:** no additional documentation added.
- Loading branch information