It doesn’t always work for me.
One time around 11 am on a day between Christmas and New Years I had never been there but I convinced a bunch of people to jump in the car and pop over to Yosemite for the day. We got there two hours before sunset, and I bluffed my way through the “did we have snow tires?” question and in we went. We spent the next two hours driving slowly in the snow into the park interior. I think we caught the last fleeting glimmer of light on El Capitan. Then we turned around and drove back in the night.
So I would NOT say San Francisco and Yosemite National Park are the same place.
I do have my limits.