Within a user manual, I need to convey the maximum time period allowed as "365 days 23 hours 59 minutes 59 seconds" - are commas expected between each component? Is the word "and" expected before the last component regardless of the time period name?
I would use commas between each component, and use "and" only if the last component is seconds. I learned way back in intermediate school that "and" is only used before fractions (so 10,247 is said "ten thousand, two hundred forty-seven" but 10 7/8 is said "ten and seven-eighths"). I would call seconds the smallest "lay person" time interval — if you're getting into fractions of a second, you've moved beyond regular timekeeping and are now talking science, so it would be formatted differently.
So using your example:
The maximum time period allowed is 365 days, 23 hours, 59 minutes, and 59 seconds, so any longer than that is a problem.
BUT if your time were shorter, it would be written:
The maximum time period allowed is 365 days, 23 hours, 59 minutes, so any longer than that is a problem.
I couldn't find explicit guidance in either the Chicago Manual of Style or the Microsoft Style Guide, but what I have observed (and would write naturally) is with commas:
The maximum time period allowed is 365 days, 23 hours, 59 minutes, and 59 seconds.
You might be tempted to write the time in ISO notation (23:59:59), but this is usually used to indicate a point in time, not a duration.
You could also cast it as a limit instead of a duration:
The time period must be less than 366 days.
I sometimes find that the solution to a messy precision problem is to attack it from the other end -- what's the first value you can't use?
You can also use the convention that time periods can be written as digits, like this:
365 days plus 23:59:59 (hrs:min:sec)