JavaScript GMT 時間 日本時間に変更

HTML:
 <lightning-input-field field-name=”StartTime__c”></lightning-input-field>

JavaScript
import StartTime from ‘@salesforce/schema/ObjectName__c.StartTime__c’;

const inputFields = this.template.querySelectorAll(‘lightning-input-field’);
if (inputFields) {
 inputFields.forEach(field => {
  if(field.fieldName == StartTime.fieldApiName) {
    starttime = new Date(field.value).toLocaleString(“ja-JP”); // GMT ⇒ 日本時間
   } if(field.fieldName == EndTime.fieldApiName) {
    endtime = new Date(field.value).toLocaleString(“ja-JP”);
   }
  });
}