I tried making a daylight sensor 24 hour clocks where the piston push coloured glass on beacon when it is the time. I am weak in redstone and can't make it work, therefore, hoping to get some help here.
We'd need more to go on, like screenshots of the actual redstone circuits and a description of what doesn't work.
Or perhaps a world download.
As general advice, since the sensor output varies with the weather I think you'd need to use a redstone clock and just use the daylight sensor to keep it synchronized, from the Wiki page it seems that the zero level (no signal) of the sensor is consistent.
Given that I'd think you'd have to either build the clock in the spawn chunks or use the forceload command to keep it constantly loaded so it stays in sync.
(I'm not certain what happens when you go to another dimension, you may need some redstone contraption that keeps shooting items into a portal to keep the Overworld from being unloaded.)
You may be better off using command blocks to read the time and, somehow, control the pistons or directly replace the blocks.