1559
Views
6
Comments
How to get the system Timezone and it's name?
Question

Hello community,

I want to get the timezone and it's name from the system. 

If my server time is UTC but if I'm accessing the application in India, it should me timezone as UTC+5:30 and Timezone name as 'India Standard Time'.

How to get it?

Please advice.

Thanks and Regards,

Suraj Borade

2019-05-22 11-30-09
Marcelo Ferreira

Hi Suraj,

You need to use this component https://www.outsystems.com/forge/Component_Details.aspx?ProjectId=500. You can get system timezone and also convert to your timezone if you want.

Regards,

Marcelo

2018-11-06 14-26-44
Suraj Borade

Hi Marcelo,

I tried that component but it is giving wrong information.


I'm in India timezone, so it should have returned me Indian timezone name and not Coordinated Universal Time.

Thanks and Regards,

Suraj Borade


2019-05-22 11-30-09
Marcelo Ferreira

Hi Suraj,

The component gave you the server timezone. If you want the client timezone you only can get it with JS. Look to this https://stackoverflow.com/questions/1091372/getting-the-clients-timezone-in-javascript.

Regards,

Marcelo

2018-11-06 14-26-44
Suraj Borade

Hi Marcelo,

This looks great. Let me give it a try.

Thanks and Regards,

Suraj Borade

2019-05-22 11-30-09
Marcelo Ferreira

Hi Suraj,

Related to your question a teammate wrote this article. Hope it helps you.

Regards,

Marcelo

2014-10-21 20-15-17
Alberto Ferreira

Marcelo


Thanks for the reference. Very good article!!


Regards

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.