I can point you to the definition of Demand Charge from PG&E here:
https://www.pge.com/en_US/small-med...anage-your-usage/usage-terms-definitions.page
It would seem to indicate that they do not average but look at the peak in a given period.
I reach the opposite conclusion from that definition. It says "Maximum Peak Demand: The highest electric use, in kilowatts (kW), during any 15-minute period during hours when peak energy pricing is in effect. "
By referring to the 15 minute period, they are talking about an average over 15 minutes. If the average was over a shorter period (could be any period down to one cycle or maybe one half cycle), then there would be no reason to mention 15 minutes in the definition. And the shorter period would be specified.
Now if you show me a bill or report that has 15 minute data, and different data for "usage" and "peak demand" for the same 15 minute period, then I would agree that the peak data uses a shorter averaging period. But the definitions or PUC regulations would specify that averaging period.
Cheers, Wayne