How to get logged In user Time zone not user preference Time Zone.

Community Alums
Not applicable

Hi,

 

How to get logged In user Time zone not from user preference Time Zone.

I have user this method - var time = new Date();  It was showing user Time zone. please find below screenshot. But I only want Time zone. How can we achieve this ?

 

Swapna9_0-1711111914619.png

 

 Thank in Advance

 

1 ACCEPTED SOLUTION

Ahmmed Ali
Mega Sage

Hello @Community Alums 

 

Assuming you want to read time zone value from the alert value in your screenshot, you can get same in client script as shown below:

 

var fullVal = new Date().toString();

alert(fullVal.substring(fullVal.indexOf("(")+1, fullVal.indexOf(")")));

 

Thanks,

Ali

If I could help you with your Query then, please hit the Thumb Icon and mark my answer as Correct!!

Thank you,
Ali

View solution in original post

4 REPLIES 4

Dhananjay Pawar
Kilo Sage

Community Alums
Not applicable

Still not get the answer, because it is not sys_user table Timezone and not user preference Timezone.

Ahmmed Ali
Mega Sage

Hello @Community Alums 

 

Assuming you want to read time zone value from the alert value in your screenshot, you can get same in client script as shown below:

 

var fullVal = new Date().toString();

alert(fullVal.substring(fullVal.indexOf("(")+1, fullVal.indexOf(")")));

 

Thanks,

Ali

If I could help you with your Query then, please hit the Thumb Icon and mark my answer as Correct!!

Thank you,
Ali

Community Alums
Not applicable

@Ahmmed Ali  Thank you so much this was helped