Am I trying to use a variable or pass a value by reference or by value?

Downwardflight:
My idea is to simulate sunlight during the day. Specifically:
I would like to be able to set the ON time with a separate "up" and "down" tactile switch with a 16 hour photo-period. ON being the start of sunrise and the lights fading from 0%/OFF up to and ideally reaching 90% approximately 7 hours after the set ON time, holding at 90% for approximately 2 hours then fading back down to 0%/OFF after 16 hours

my feeling is that the "total ambient light" changes extremely rapidly for the first and last hour (or even 45mins) of each day and hardly any at all (from a "noticeable" perspective) the rest of the day.

Likewise when you fade a led up from zero, most of the perceived change in brightness happens between zero and 125 (8bit resolution). Because persistence of vision, it is harder to notice a change in brightness as teh PWM goes above 125 towards 255.

but throw that all away and get back to your goal...you should be focusing on creating a non-blocking function that would give you the climb and descend rate you want. that is, your target brightness, your current level and your desired period to make a change. Search for non-blocking fading and you will find the prototype for what you want to do.

an update() function in loop should serve to always be moving your PWM towards its target position. your functions would include a setTarget() to define where that climb is.

pseudo:

void loop() 
{
  leds.update();
  if (time == sunrise)
  {
    leds.setTarget(245, 7); // target PWM and time to get there in hours
  }
  else if (time == sunset - 7)
  {
    leds.setTarget(0, 7);  // 
  }
}

another method would be included in update() to add or suppress brightness for periods in during the day (random clouds).