Fix totem date decoding