 
   alias Xandra.{Batch, Error, Frame, Prepared, Page, Simple, TypeParser}
   alias Xandra.Cluster.StatusChange
+
+  @unix_epoch_days 0x80000000
 
   # We need these two macros to make
   # a single match context possible.

    <<value::64>>
  end

  defp encode_value(:date, value) when value in 0..0xFFFFFFFF do
    <<value::32>>
  end

  defp encode_value(:decimal, {value, scale}) do


  defp decode_value(<<value::64-signed>>, :timestamp), do: value

  defp decode_value(<<value::32>>, :date), do: (value - @unix_epoch_days)

  defp decode_value(<<value::32-signed>>, :int), do: value

