Which of the following factors affects the onset of flowering in crops?