diff --git a/src/@dates/intersect.m b/src/@dates/intersect.m
index d0af9741d8056e7fff75a983e0b9926dcd7891bb..c8328875e6c960533f5e577bc36f7fe1e1eb727b 100644
--- a/src/@dates/intersect.m
+++ b/src/@dates/intersect.m
@@ -38,9 +38,10 @@ if ~isequal(o.freq,p.freq)
     return
 end
 
-% Octave 6.1.0 added support for the 'legacy' option, but we don't use it
-% because of this bug: https://savannah.gnu.org/bugs/?59708
-if isoctave
+% Octave 6.1.0 added support for the 'legacy' option, but it was buggy.
+% The problem should be fixed in Octave 6.2.0.
+% See: https://savannah.gnu.org/bugs/?59708
+if isoctave && octave_ver_less_than('6.2')
     time = intersect(o.time,p.time,'rows');
 else
     time = intersect(o.time,p.time,'rows','legacy');