HAProxy community

Date_us() in 1.9 and leading zeros


#1

So I’ve been trying to take advantage of the higher precision timestamps in 1.9 for both our newrelic instumentation header, and our log timestamps. I did something like this:

log-format "%[date()]%[date_us()]"

and eventually noticed unbalanced timestamp lengths in the logs:
1550177696971084
1550177696991865
15501776973844
155017769714073

The documented type is integer, so I realize it is dropping the leading zeroes when converted to a string. Is there any way to pad with leading zeros?

Thanks!