Timestamp

Format

All the timestamps in KUSK dataset follows to the next format.

%Y%m%d_%H%M%S_%N

Note: %N is nano seconds, but it is rounded into mili seconds or micro seconds in KUSK Dataset.

例: 13th May 2014, 12:21:29.662

20140513_122129_662000

Parse Code(Ruby)

A sample code for parsing the timestamp.

def parse_time(timestamp_str)
  buf = /(\d{4})(\d{2})(\d{2})_(\d{2})(\d{2})(\d{2})_(\d+)/.match(timestamp_str)
  return nil if nil == buf[0]  Time.utc($1.to_i,$2.to_i,$3.to_i,$4.to_i,$5.to_i,"#{$6}.#{$7}".to_r)
end