kite-sdk / kite

Kite SDK
http://kitesdk.org/docs/current/
Apache License 2.0
394 stars 263 forks source link

Year insertion logic for ConvertTimestamp command #444

Open tmgstevens opened 8 years ago

tmgstevens commented 8 years ago

ConvertTimestamp doesn't have any capability to add missing years (for example in Syslog dates). As such, the example at http://kitesdk.org/docs/1.1.0/morphlines/#SyslogUseCase-Solution will have all imported dates set to 1970.

This code adds a feature to convertTimestamp to add a missing year if required, with logic to handle year rollover scenarios using a configurable sliding window (defaults to 11 months in the past, 1 in the future)