Notice there is no format in which timezone is specified as 4 digits without the colon, and yet 'date +%z' returns ±NNNN.
$ date
2023-08-31T11:15:00-07:00±NNNN is valid (without colon) if used as part of the "basic" format. i.e. no hyphens or colons anywhere in the format.
Thus the following are equivalent and both valid:
2023-09-01T09:40:01+08:00
20230901T094001+0800