       :gt
 
   """
-  @spec compare(Calendar.datetime, Calendar.datetime) :: :lt | :eq | :gt
-  def compare(%DateTime{utc_offset: utc_offset1, std_offset: std_offset1} = datetime1,
-              %DateTime{utc_offset: utc_offset2, std_offset: std_offset2} = datetime2) do
+  @spec compare(Calendar.datetime(), Calendar.datetime()) :: :lt | :eq | :gt
+  def compare(
+        %DateTime{utc_offset: utc_offset1, std_offset: std_offset1} = datetime1,
+        %DateTime{utc_offset: utc_offset2, std_offset: std_offset2} = datetime2
+      ) do
     {days1, {parts1, ppd1}} =
       datetime1
       |> to_iso_days()

      -18000

  """
  @spec diff(Calendar.datetime, Calendar.datetime) :: integer()
  def diff(%{utc_offset: utc_offset1, std_offset: std_offset1} = datetime1,
           %{utc_offset: utc_offset2, std_offset: std_offset2} = datetime2, unit \\ :second) do
    naive_diff =
      (datetime1 |> to_iso_days() |> Calendar.ISO.iso_days_to_unit(unit)) -
      (datetime2 |> to_iso_days() |> Calendar.ISO.iso_days_to_unit(unit))
    offset_diff =
      (utc_offset2 + std_offset2) - (utc_offset1 + std_offset1)
    naive_diff + System.convert_time_unit(offset_diff, :second, unit)
  end


    iso_days1 = {days1, parts1 * ppd2}
    iso_days2 = {days2, parts2 * ppd1}

    case {iso_days1, iso_days2} do
      {first, second} when first > second -> :gt
      {first, second} when first < second -> :lt
      _ -> :eq
