I tested this on Giant Chasm in my game -- to my surprise, it's legit. This process does cause the weather to go away. It only worked after I caught a Pokemon (after moving the clock forward and loading the save file).
Seasons are out of the question, because time-based events ignore changes in the DS clock for 24 hours (and sure enough, my game loaded with Autumn both times). I also think RNG is out of the question because this works for the Giant Chasm, where fog is permanent. I think it's unlikely we'll find a confident answer to this question without knowing source code.