function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Nagarajan CNagarajan C 

I want to login user date and time in my js in LWC

I want to login user date and time in my js in LWC so i tired below option.

import LOCALE from '@salesforce/i18n/locale';
import TIME_ZONE from '@salesforce/i18n/timeZone';


// this.locale-'en-US
//timeZone- (GMT-04:00) Eastern Daylight Time (America/New_York)

let dateTime= new Date().toUTCString(this.locale,{timeZone:this.timeZone});

Result is showing in console -Mon, 09 Aug 2021 06:58:18 GMT

but i want expect result is -Mon, 09 Aug 2021 02:58:18 .

So how to get without timezone for all my user.

Thanks
C. Nagarajan
ShivankurShivankur (Salesforce Developers) 
Hi Nagarajan,

Please check out the solution posted over below thread:
https://salesforce.stackexchange.com/a/175677/96007

You might need to go with similar logic to make it work.

Hope above information helps. Please mark as Best Answer so that it can help others in future.

Thanks.