Sleeping on it I figure that while format_time would likely work in this
particular circumstance the more general form of my question is does
RainerScript allow for the parsing of a string into a date time value/property?
Also I think to handle the fraction number of seconds the following would be
needed, yes?
set $.timestamp = cnum($!Timestamp);
set $.seconds = $.timestamp / 1000; # does this need to be cstr() ?
set $.subseconds = cstr($.timestamp % 1000); # is cstr() necessary ?
set $.Timestamp = replace(format_time($.seconds,"date-rfc3339"), "Z", "." &
$.subseconds & "Z");
if $.Timestamp == cstr($.seconds) || strlen($.Timestamp) == 0) { # failure to
convert
$.Timestamp = $!Timestamp; # fall back to original value
}
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE
THAT.