Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
HOWEVER, seeing your code, the data you want to update is dependant on time, so there's no point to store the value on the node and update it on node save or view execution. I guess that value must be calculated on the fly when the node is viewed (full view, teaser, displayed on a view, etc), or even by the JS layer.
I don't think is a good idea to update nodes when they are displayed on a view. That would make the view rather heavy in performance terms, and it will be updating nodes when is not needed (once they are updated you must provide a way to detect they are already updated or they will be updated again and again). Besty way is to update all programmatically and then update on node save.