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
New Developer
Raposo
Posts: 19
Registered: ‎07-22-2008
My Device: Not Specified
Accepted Solution

update of time and date

Hello:

 

My application needs that date and time the device is correct.
Is there any way to establish the source of the time to Network and upgrade it?

 

BlackBerry Java Development Environment: 4.2.1

 

Thanks.

Please use plain text.
Developer
kzettel
Posts: 120
Registered: ‎07-16-2008
My Device: 9000

Re: update of time and date

You can get the network time from RadioInfo.getNetworkTime(System.currentTimeMillis());

 

You can set the device time using net.rim.device.api.system.Device.setDateTime(dateTimeMillis);

 

I do not think APIs are available in 4.2.1 to set the time zone so the device may still show the incorrect time.

Kurt Zettel | Chief Architect | Metova
www.metova.com
Please use plain text.
Administrator (Retired)
mkirkup
Posts: 179
Registered: ‎07-14-2008
My Device: Not Specified

Re: update of time and date

We have added the necessary APIs in the 4.6 JDE to allow you to set the TimeZone of the device.

 

Mike Kirkup
Director, Developer Relations
Please use plain text.