cancel
Showing results for 
Search instead for 
Did you mean: 

Timezone info on webpage

Former Member
0 Kudos

Hi All

I have to develop an webpage where I have to show the time select with timezone information from Server. How to get the timezone of server on the webpage.

Many thanks in advance.

Cheers

Rupesh

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

You can get the timezone of the MII server in a Transaction using something like this in the link editor

datefromxmlformat( datenow, "zzzz" ) and assign this value to an output parameter.

You can then get the value to your page via ajax or if you are using an irpt page you can use an xacute query and a servlet tag.

Former Member
0 Kudos

Thansk Cristian, I had simillar thing in my mind to do but rather than taking timezone from MII server, I think I will get the from the database and write a Query template for it.

I was wondering if there is any ready way to do that, like some service under ..XMII/Illuminator?Service=SystemInfo through which We can get that info.

@Rajesh : The Javascript runs on Client machine and I am pretty sure that function will return date on the Client Machine and not on Server.

Thanks

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Rupesh,

You can get Server timezone information on webpage using JS.

create a function in JS and call the function in webpage

function startDate()

{

  //Calculation for Start Date

    var date = new Date();

    var theyear = date.getFullYear();

    var themonth = date.getMonth()+1;

    var thetoday = date.getDate();

      var StartDate = themonth+"/"+thetoday+"/"+theyear;

}

Hope this helps!!!!