# Adding a human-readable timestamp field.

**URL:** <https://community.zeek.org/t/adding-a-human-readable-timestamp-field/2778>\
**Category:** Zeek\
**Created:** [August 16, 2013, 9:33am UTC](https://community.zeek.org/t/adding-a-human-readable-timestamp-field/2778 "2013-08-16T09:33:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![user13](https://avatars.discourse-cdn.com/v4/letter/u/a88e57/32.png) [@user13](https://community.zeek.org/u/user13)\
**Post date:** [August 16, 2013, 9:33am UTC](https://community.zeek.org/t/adding-a-human-readable-timestamp-field/2778/1 "2013-08-16T09:33:38Z")

</div>

Hello  
I try to add human-readable timestamp field to capture\_loss.log and stats.log

for stats.log  
event Stats::log\_http(rec: Stats::Info)  
{ …

}

this did not work

and for the capture\_loss there was no rec event to trigger.

is there another event I can use?

---

<div class="post-metadata">

**Author:** ![KB1](https://avatars.discourse-cdn.com/v4/letter/k/e47774/32.png) [@KB1](https://community.zeek.org/u/KB1)\
**Post date:** [August 16, 2013, 11:45am UTC](https://community.zeek.org/t/adding-a-human-readable-timestamp-field/2778/2 "2013-08-16T11:45:39Z")

</div>

My guess is the suggestion would be to derive the human readable time from epoch time in the log already. Unless you have your reasons of course.  
See “cf” in the list on this page:  
[http://bro.org/community/software.html](http://bro.org/community/software.html)  
ftp://ee.lbl.gov/cf.tar.gz

# Original epoch time in log

$ grep -v “^#” capture\_loss.log | head -n 4  
1376652216.898400 900.001180 worker-4 0 328165 0.000%  
1376652223.161080 900.095410 worker-5 0 340367 0.000%  
1376652224.511310 900.052610 worker-7 0 372860 0.000%  
1376652224.377070 900.109850 worker-9 0 294452 0.000%

# Epoch time converted to human readable time using CF

$ grep -v “^#” capture\_loss.log | head -n 4 | /usr/local/bin/cf  
Aug 16 11:23:36 900.001180 worker-4 0 328165 0.000%  
Aug 16 11:23:43 900.095410 worker-5 0 340367 0.000%  
Aug 16 11:23:44 900.052610 worker-7 0 372860 0.000%  
Aug 16 11:23:44 900.109850 worker-9 0 294452 0.000%

-kb

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/zeek/original/1X/f09d732bc2cc7c7cc7e35db67cf4e1d5233ce7a7.png) [@system](https://community.zeek.org/u/system)\
**Post date:** [May 6, 2022, 3:41pm UTC](https://community.zeek.org/t/adding-a-human-readable-timestamp-field/2778/3 "2022-05-06T15:41:09Z")

</div>


