Localization and Globalization

Posts   
 
    
pandu avatar
pandu
User
Posts: 86
Joined: 18-May-2006
# Posted on: 10-Sep-2008 07:50:36   

Well...

In ASP.NET Web Application.... made a mistake of storing all date and time fields with the server date and time. And the server located in US time zone...

Now, as I approaching this application to be a SaaS service, the date and time has to be shown to the local time zone of the logged in user and in local format (dd/mm/yy or mm/dd/yy)

I am storing the time zone for the each user and now, I want to display the Date and Time in local time zone from the Server Time Zone and in Local format (either the dd/mm/yy or mm/dd/yy).

Is there anyway I can achieve it with LLBLGen Classes without rewriting the entire presentation layer?

Thanks in advance.

PS: Using Telerik Controls for presentation layer and LLBLGen's Adapter for DAL

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 10-Sep-2008 08:09:08   

Is your GUI ASP.Net or WinForms? Do you have some "timezone" field for each user? Is the date field indeed a DateTime type field?

David Elizondo | LLBLGen Support Team
pandu avatar
pandu
User
Posts: 86
Joined: 18-May-2006
# Posted on: 10-Sep-2008 08:23:30   

daelmo wrote:

Is your GUI ASP.Net or WinForms? Do you have some "timezone" field for each user? Is the date field indeed a DateTime type field?

Yes. It is ASP.NET

and Yes, I do have timezone field for each user..

and Yes... All date fields in the system are indeed datetime fields. simple_smile

Thanks.

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 10-Sep-2008 09:51:23   

An otpion is to handle this in EntityValidation -> ValidateEntityAfterLoad, where you can modify the dateTime fields according to the user timezone.

The best part is that you don't have to re-build your application, just add a dll with the validation code and modify the application config file to allow for Dynamic Injection.

A relevant thread: http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=10362