The problem is that I cant seem to get the integer that I have split to 4 bytes (intVal) and written to the DS1302 to come back out and merge into one 32 bit integer (merge_var)
If you want to bitshift and not use the union to recombine, you need to recast the bytes which are currently being bit shifted to oblivion
uint32_t merge_var = 0;
unsigned char byte0,byte1,byte2,byte3 = 0;
merge_var = byte0 | uint32_t (byte1) << 8 |uint32_t (byte2) << 16 | uint32_t (byte3) << 24;