Skip to content

Instantly share code, notes, and snippets.

@acharlieh
Created May 2, 2017 03:41
Show Gist options
  • Save acharlieh/f992578443ecab4564758f9bbdf15f12 to your computer and use it in GitHub Desktop.
Save acharlieh/f992578443ecab4564758f9bbdf15f12 to your computer and use it in GitHub Desktop.
Try this out, with a few different time zones, time picker set to a few days or so.
| gentimes increment=1s
[ makeresults
| addinfo
| rename info_max_time -> end info_min_time -> start
| fields start end
| convert timeformat="%m/%d/%y:%H:%M:%S" ctime(*) as *
| format "" "" "" "" "" ""]
| rename starttime -> _time
| fields
| bin span=1h _time as hourly
| eval evalhourly=round(relative_time(_time,"@h"))
| bin span=12h _time as twelvehour
| bin span=24h _time as twentyfourhour
| eval evaldaily=round(relative_time(_time,"@d"))
| bin span=1d _time as daily
| convert ctime(*) as *_human
| stats values(*) as *
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment