yes the second way is the way it has to be done. There is no other way
You can’t directly set the time on globals We had to do that because else we didn’t see any changes (because you update an internal value of the date object)
So the behavour is the same as with all other types of data (string or numbers) you have to reallt assign it back.
Can this be extrapolaed to a generalisation that a construct of the form globals.foo.function() which attempts to set foo (or something therein) will not work, for all data types and all functions?