I need current date and time, formatted as above, for whenever I call that query. If I run it 10 minutes from now, it shouldn't have the same timestamp as before. Is moment supposed to hold some arbitrary value and never update?
Are you still seeing this issue? How/where are you using this code? It sounds like it may not be getting re-evaluated when you need the updated value.
This works well in a JS query. Every time I click "Run" on the query, I get an updated time:
However, in a transformer, I need some reason for the transformer to re-evaluate (i.e. re-saving it, updating a component that is referenced in the transformer, etc) otherwise it'll have the outdated time