diff --git a/backtrader/resamplerfilter.py b/backtrader/resamplerfilter.py
index <HASH>..<HASH> 100644
--- a/backtrader/resamplerfilter.py
+++ b/backtrader/resamplerfilter.py
@@ -162,8 +162,8 @@ class _BaseResampler(with_metaclass(metabase.MetaParams, object)):
         return point
 
     def _barover_subdays(self, data):
-        # Put session end in context of current datetime
-        sessend = data.datetime.tm2dtime(data.sessionend)
+        # Put session end in context of last bar datetime
+        sessend = int(self.bar.datetime) + data.sessionend
 
         if data.datetime[0] > sessend:
             # Next session is on (defaults to next day)
Fixes #<I> by correctly calculating when the current session ends for the last bar (when next session data is already in)