Fixed isPast timestamp calculation