cancel
Showing results for 
Search instead for 
Did you mean: 

Timezones and dates in Web Dynpro

Former Member
0 Kudos

Hello all,

We have a web dynpro application and it seems to be showing different dates for different users in our application. I am trying to figure out how web dynpro determines which locale to use (or timezone) when displaying. We are exposing the WD through EP 6.0 SP2, but I do not think there are any locale specific settings there. The only thing I can think it is doing is for users that do not have a timezone specified it is using UTC instead of the system timezone. Does anyone know definitevely what WD uses to display dates? Also, is there a way we can force all dates shown in WD to show in a particular timezone (i.e. PST)?

Help is appreciated.

Thanks,

Dustin Gronso

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Dustin,

You can show the time in a specific timezone using the following code :

TimeZone zone = TimeZone.getTimeZone(("PST");

DateFormat dateFormat = DateFormat.getDateTimeInstance();

dateFormat.setTimeZone(zone);

String time = dateFormat.format(Calendar.getInstance().getTime());

Hope this helps,

Best Regards,

Nibu.