Skip to main content
2 of 4
added 237 characters in body
David Reed
  • 93.7k
  • 14
  • 90
  • 166

Prepopulating Time field in Lightning Quick Action: user time zone not respected

I am building a Lightning Quick Action for an object that includes a field of type Time. I would like to prepopulate that Time field with the current time, while allowing the user to make changes.

I added a Predefined Field Value to my Quick Action with the formula TIMENOW():

enter image description here

The documentation for TIMENOW() says

Returns a time value in GMT representing the current moment

The displayed value is based on the organization’s Locale settings.

TIMEVALUE() shows

Returns the local time value without the date

What I'm getting displayed when I launch the Quick Action is definitely GMT, 4 hours ahead of local, despite that my org's default time zone is Pacific Time and my user's configured time zone is Eastern Time:

enter image description here

I've also tried TIMEVALUE(NOW()) and got the same result. The incorrect time persists if the record is actually saved (i.e. the resulting record shows a value 4 hours ahead of local).

Is this broken, or am I misunderstanding what to expect from this functionality? Is there an alternate way to obtain the locale-respecting time value of this moment?

David Reed
  • 93.7k
  • 14
  • 90
  • 166