Announcement

Collapse
No announcement yet.

TimeZone of a particular DateTime field

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • TimeZone of a particular DateTime field

    Here is the context of the problem.

    The CRM User is a company employee, who is located in (for example) the "America/New York" or EST timezone.

    The company uses the CRM to manage jobs performed for customers. Customers can be located anywhere, so in different timezones.

    On the Job Detail view, we show a custom DateTime field called "Scheduled Start Time".

    Let us say that the customer is located in "America/Chicago" or CST timezone.
    It is confusing for the User if this field is displayed in the User's Timezone (EST) or in UTC.
    In this example, the field show both show the values and allow input of the values in CST.

    In other words, we need to be able to dynamically select the timezone of custom DateTime fields in the UI. All DateTime values are stored in the backend in UTC.

    How can this be done, so that both the display and the input/update of a DateTime field is done in a dynamically specified timezone?

  • #2
    I guess you have any field, which tells the actual timezone of your employee. Then you can create a datetime field and process the actual local time according to that timezone by formula as described here: https://docs.espocrm.com/administrat...datetimeformat

    Comment


    • #3
      You need to create a custom field view with date-time picker. The current datetime view converts values to UTC and UTC is sent to the backend. There's no designed way to suppress conversion.

      Option 1. Your field does not do conversion. You convert to UTC in the backend.
      Option 2. Your field does conversion according selected timezone and sends UTC to the backend.

      Comment

      Working...
      X