If you need to create an array of store hours (for example), the following function can generate an associative array of values quickly, with the hours formatted and stepped (every hour, 30 mins, etc.) as you wish.
I’ve seen similar functions using DateTime(), but we’re already working with timestamps, so there’s really no need.