Technically, your visa is not valid when you are scheduled to land so boarding is a problem.
Practically, it will be perfectly valid by the time you reach the immigration counter, so you are dependent on the discretion of check-in staff. Be nice, they will let you board.
If your flight lands early then keep sitting in your seat and pretend that you like to disembark the airplane late and then walk slowly and join one of the longer lines at immigration to try to make it midnight before it’s your turn.
I was at DME recently at it took me 1 hour to reach the counter after coming out of the airplane.