Custom time encoding to be range query friendly in YAML encoder.