import codec.base64.standard as base64 import codec.json as json

function to_timestamp(t) @begin

  return base64.encode(json.to_string(json.from_var({
      "year": t.year,
      "day" : t.yday,
      "hour": t.hour,
      "min" : t.min
  }.to_hash_map())))

@end end

function from_timestamp(t)

  return json.to_var(json.from_string(base64.decode(t)))

end

var str = to_timestamp(runtime.local_time()) var obj = from_timestamp(str)

system.out.println(to_string(1900 + obj.year) + “年” + obj.day + “日” + obj.hour + “时” + obj.min + “分”) system.out.println(str)