gs.minutesAgo with TZ consideration

tony_fugere
Mega Guru

gs.minutesAgo(-10) returns time in UTC format when used on a field in a template. It would be nice if there were some TZ consideration in a few new [period]Ago methods. Try these out in a date field on a template and apply the template:

javascript:gs.nowDateTime()
javascript:gs.minutesAgo(-10)

Notice the minutesAgo is in UTC while nowDateTime is local time.

6 REPLIES 6

hartr
Giga Contributor

Did you find a neat way to do this ? I simply want to set a date field is a template to "javascript:gs.daysAgo(-7)" but can't get it to work. Thanks


jshields
Giga Contributor

GMT is 5 hours ahead of us so I just subtracted it (300 minutes), less the 10 minutes I wanted for the change.  



find_real_file.png