I have enable the persistent context,
But when the server finishes the reboot it flushes the current time to my flow.set function and overrides my initial saved time. therefor the timer start counting from 0 (from the current time)
[{"id":"7771cfcd.f701","type":"tab","label":"Flow 14","disabled":false,"info":""},{"id":"1d5d8faa.283c7","type":"debug","z":"7771cfcd.f701","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":890,"y":300,"wires":[]},{"id":"11cec979.b5e5c7","type":"inject","z":"7771cfcd.f701","name":"","topic":"","payload":"","payloadType":"date","repeat":"1","crontab":"","once":false,"onceDelay":0.1,"x":130,"y":300,"wires":[["fb96a9ee.103c38"]]},{"id":"fb96a9ee.103c38","type":"simpletime","z":"7771cfcd.f701","name":"","x":310,"y":300,"wires":[["fbd9195f.cc36f8"]]},{"id":"afab928c.37628","type":"function","z":"7771cfcd.f701","name":"[s] to [hh:mm:ss]","func":"\nvar timeStart = flow.get(\"startTimeMyepoch\") /1000\n\nvar seconds =( msg.myepoch /1000 +msg.count) -timeStart;\n\nvar days = Math.floor(seconds / (3600*24));\nseconds -= days*3600*24;\nvar hrs = Math.floor(seconds / 3600);\nseconds -= hrs*3600;\nvar mnts = Math.floor(seconds / 60);\nseconds -=mnts*60;\nconsole.log(days+\" days, \"+hrs+\" Hrs, \"+mnts+\" Minutes, \"+seconds+\" Seconds\");\n\nmsg.payload = (\"0\"+days).slice(-2)+\" days, \"+(\"0\"+hrs).slice(-2)+\" Hrs, \"+(\"0\"+mnts).slice(-2)+\" Minutes, \"+Math.round(seconds)+\" Seconds\";\n//msg.payload = days+\" days, \"+hrs+\" Hrs, \"+mnts+\" Minutes, \"+seconds+\" Seconds\";\n\nreturn msg;","outputs":1,"noerr":0,"x":700,"y":300,"wires":[["1d5d8faa.283c7","e38c85b3.6ebed8"]],"info":"counts from a fixed position in time. - timeStart\n"},{"id":"fbd9195f.cc36f8","type":"counter","z":"7771cfcd.f701","name":"Sec. Counter","init":0,"step":"1","lower":null,"upper":null,"mode":"increment","outputs":"1","x":530,"y":220,"wires":[["afab928c.37628"]]},{"id":"d93db91a.c4f3d8","type":"ui_button","z":"7771cfcd.f701","name":"","group":"d0615552.932c78","order":31,"width":2,"height":1,"passthru":false,"label":"Reset Time","tooltip":"","color":"","bgcolor":"","icon":"","payload":"msg.rest=true","payloadType":"str","topic":"","x":110,"y":440,"wires":[["78fcd6b4.b7d288"]]},{"id":"78fcd6b4.b7d288","type":"function","z":"7771cfcd.f701","name":"send reset request","func":"msg.reset = true;\n\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":440,"wires":[["dd7a0ef9.98e94","fbd9195f.cc36f8"]]},{"id":"dd7a0ef9.98e94","type":"trigger","z":"7771cfcd.f701","op1":"","op2":"","op1type":"pay","op2type":"nul","duration":"10","extend":true,"units":"s","reset":"","bytopic":"all","name":"","x":570,"y":440,"wires":[["3315b32d.f35d6c"]]},{"id":"3315b32d.f35d6c","type":"function","z":"7771cfcd.f701","name":"Display Start Time","func":"\nmsg.Stime=msg.myday+\" \"+ msg.mydom+ \"/\"+ msg.mymonthn+ \"/\"+ msg.myyear+ \"@\"+ msg.mytimes; \nvar startTimeMyepoch =flow.set(\"startTimeMyepoch\",msg.myepoch);\nvar startTime= flow.set(\"startTime\",msg.Stime);\nmsg.payload=msg.myepoch\nreturn msg;\n\n//var total=flow.set(\"total\", 123);","outputs":1,"noerr":0,"x":750,"y":440,"wires":[["bf8706da.445c48","afab928c.37628","f87d43b2.726d6"]]},{"id":"5b854f6c.7985b","type":"comment","z":"7771cfcd.f701","name":"reset Start Time","info":"","x":120,"y":580,"wires":[]},{"id":"94bd5bf8.c66a68","type":"comment","z":"7771cfcd.f701","name":"Elapsed Time from Current Time","info":"","x":210,"y":260,"wires":[]},{"id":"84a84497.9bc728","type":"comment","z":"7771cfcd.f701","name":"Trigger = Delay until reset request","info":"","x":590,"y":580,"wires":[]},{"id":"4e9feabd.c75c04","type":"simpletime","z":"7771cfcd.f701","name":"","x":310,"y":500,"wires":[["dd7a0ef9.98e94"]]},{"id":"9c1974ac.c16598","type":"inject","z":"7771cfcd.f701","name":"","topic":"","payload":"","payloadType":"date","repeat":"1","crontab":"","once":false,"onceDelay":0.1,"x":130,"y":500,"wires":[["4e9feabd.c75c04"]]},{"id":"bf8706da.445c48","type":"debug","z":"7771cfcd.f701","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":950,"y":480,"wires":[]},{"id":"f87d43b2.726d6","type":"ui_text","z":"7771cfcd.f701","group":"d0615552.932c78","order":16,"width":0,"height":0,"name":"","label":"text","format":"{{msg.Stime}}","layout":"row-left","x":1060,"y":400,"wires":[]},{"id":"e38c85b3.6ebed8","type":"ui_text","z":"7771cfcd.f701","group":"d0615552.932c78","order":15,"width":0,"height":0,"name":"","label":"text","format":"{{msg.payload}}","layout":"row-left","x":880,"y":200,"wires":[]},{"id":"d0615552.932c78","type":"ui_group","z":"","name":"Default","tab":"21ad5df2.558152","disp":true,"width":12,"collapse":false},{"id":"21ad5df2.558152","type":"ui_tab","z":"","name":"Sensors","icon":"dashboard","disabled":false,"hidden":false}]