How to display a correct day bar


In Hong Kong, the correct trading time is 0900-1200, 1300-1630, and 1715-0100. There are totally three sessions for one day. The daily bar needs to carry over to next day. It was wrong for day bar. Can anyone help for me??

See this: