Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Regular Contributor
DingDang
Posts: 61
Registered: ‎03-28-2010
My Device: Bold 9700
My Carrier: Maxis Malaysia
Accepted Solution

How to get selected time settings from device?

Hi!

 

I'm doing some small project and need to get user's settings, particularly Date/Time (Options - Date/Time). I need to get the information on the selected Time Zone (GMT) and Time Format.

 

How can I do this?

Please use plain text.
Developer
RexDoug
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: How to get selected time settings from device?

[ Edited ]

Get an instance of the calendar and call Calendar.getTimeZone(). This is covered in the javadocs.

 

See TimeZone and Calendar.

 

Also see DateFormat.formatLocal()

 

Please use plain text.
Regular Contributor
DingDang
Posts: 61
Registered: ‎03-28-2010
My Device: Bold 9700
My Carrier: Maxis Malaysia

Re: How to get selected time settings from device?

Thank you very much, sir. :smileyhappy:

Please use plain text.