How do I get the start of the day in a given timezone?
For example, if I had a date object x representing Jan 1 9pm GMT, then x.startOfDayInTimeZone("Australia/Perth") should be Jan 1 4pm GMT, as "Australia/Perth" is GMT+8 (so Jan 1 9pm GMT is Jan 2 5am Perth, and the start of day is Jan 2 midnight Perth which is Jan 1 4pm GMT).
I've already got the library date-fns and date-fns-tz installed so if I could do this using those libraries that would be preferred (but not essential).