Select time format on x-axis dependent on displayed range

I could not figure out how to change the time format when zooming in/out though... can you point me to where this happens in the code?