on 12-04-2006 4:18 PM
Hi All,
Could you please tell me how to set the time zone. For example If I want to Set time Zone for a user to 'GMT+01:00 (Africa/Malabo) Western African Time' , How to do it?. I am trying the bellow code, but its not working. Can some modify it?
String Uid = "USER.PRIVATE_DATASOURCE.un:test1";
IUserMaint us = UMFactory.getUserFactory().getMutableUser(Uid);
String tz="GMT+01:00 (Africa/Malabo) Western African Time";
final TimeZone tz = TimeZone.getTimeZone(tzString);
us.setTimeZone(tz);
us.save();
us.commit();
The above code is saving only in GMT (as UK is local county for me), but I want to set it to timezone -->GMT+01:00 (Africa/Malabo) Western African Time.
PL: Points will be awarded for right answer. Help please
Regards
Maruti
Hi Maruti,
Use following format:
final TimeZone tz = TimeZone.getTimeZone("Africa/Malabo");
If you want to specify specific time then use <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/SimpleTimeZone.html">SimpleTimeZone</a>.
Regards
Abhilash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.