Splicing together phpfiwa feeds

I've been reading code and looking at posts and wondering if there is a good way to put together a phpfiwa feed using 3 time ranges from other feeds. The main feed 88062 would need to have about five days of data from a phpfina feed added to the end of it, then data up to the present from another phpfiwa feed.



Earliest-1456381200     88062  Use these data points

1456381201-1457469479   4      Data from feed 4 of local emoncms (phpfina)

1457469480-onward       114522 Datapoints from 114522 (phpfiwa)

 

I've looked at the useful scripts and trying to modify them, but it seems tricky to get the intervals to line up. Any thoughts?