This is a migrated thread and some comments may be shown as answers.

Local Time

1 Answer 189 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
David Hosey
Top achievements
Rank 1
David Hosey asked on 20 Sep 2008, 11:34 AM
Hello,

We have a Date and Time on the footer of each report. Our server is in US and our clients are based in Ireland. How can I manage to display client local time on the bottom of the report when the report is being generated or exported to RTF or PDF.

Regards,

1 Answer, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 23 Sep 2008, 02:51 PM
Hi David,

Generally you can do this by hard coding the culture for the Textbox item showing the datetime info.
In a more global aspect, this is also possible when the user opens the report with IE. Then we can get the UserLanguages that he has from the browser using the HttpRequest object and set the respective language i.e.

 if (Request.UserLanguages.Length > 0)
        {
            System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo(Request.UserLanguages[0]);
        }

 To use this feature you should also set enableClientBasedCulture attribute of the globalization element in the Web.config file to true.

Best wishes,
Steve
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
General Discussions
Asked by
David Hosey
Top achievements
Rank 1
Answers by
Steve
Telerik team
Share this question
or