Foxhole simulates the day and night cycle by changing the lighting and reducing your visual range at night.
A 24hr day in the game takes one real hour. One in-game hour lasts 2.5 real minutes.
You can check the in-game time at the bottom left of the map.
Daylight starts at 6AM and ends at 6PM. During the night your vision is limited to circle of light around your character. That circle shrinks as the night advances and is smallest at midnight, then it starts growing back til dawn breaks. Soldiers, Emplacements, tripods, and Field Guns outside the circle of light are invisible to you.
During the night, the circle of light has a radius of 31m at 6AM or 6PM, and a radius of just 14m at midnight.