1. Home
  2. Developer Guide
  3. JavaScript Library
  4. toCurrentUserTimezone


This function is used to convert the Date/Datetime values in any time zone to the current user time zone. It takes as parameters the Date/Datetime values and the Boolean flag “IsDateFormat” and then returns the value in current user time zone under the date format “yyyy-MM-dd” if the “IsDateFormat” equal to true otherwise to the date time format “yyyy-MM-dd hh:mm:ss+TZ”.

  • Functions:  toCurrentUserTimezone(date, IsDateFormat)
  • Usage:  var datetimeValue = toCurrentUserTimezone(“2019-02-07 20:40:36+00”, false);

 var dateValue = toCurrentUserTimezone(“2019-01-17 23:00:00+00”, true);

  • Output:  “2019-02-07 21:40:36+01”


Was this article helpful to you? Yes No

How can we help?