08-10-2011 05:35 AM
I am trying to Retrieve the name of TimeZone like "Indian Stanard Time".
I am using below method to retrieve the TimeZone
which returns:- (GMT+05:30) Chennai, Kolkata, Mumbai, New Delhi
which returns:- Kolkata (+5.5)
But I am not able to find the name like "Indian Stanard Time". Whcih is possible in Android using TimeZone class but in BB I am not able to retrieve that So is there any method/API that gives me the name like
"Indian Stanard Time".
08-12-2011 09:34 AM
The API allows you to retrieve the list of time zones you see under Options, Date/Time, Time Zone. Indian Standard Time is not listed there (at least on the BlackBerry Smartphone I checked). If you are seeing different behaviour please let us know what BlackBerry Smartphone model and BlackBerry device software version are you testing on? You can find this under Options, About on the BlackBerry Smartphone.
08-16-2011 05:39 AM
I am Testing on Curve 3G 9300.
Yes API list out TimeZones as we can see under options->Date/Time->TimeZone.
I just want to confirm that it is possible to list out the Name like "Indian Standard Time" same is possible in Android.
10-03-2011 07:08 AM
I tried using TimeZone and TimeZoneUtilities class as well but still not able to get the desired result. I need to display the short name of timezone for e.g. "IST" instead of "Indian Standard Time" or any other. However, I could only manage to get "Asia/Pacific" or "Kolkata (+5.5)" using the APIs. Can anyone say how to get only the short name of the selected timezone?
Below is my piece of code:
// this gives "Kolkata (+5.5)"
// this gives "Asia/Pacific"
Can anyone suggest?
10-05-2011 03:52 AM
We can not retrieve the name like "IST" because BB does not support the core JAVA API's.
I think that BlackBErry should support the Core JAVA API's as Supported by Android.
Though BB's Native code is in java but still its not supporting core java API's.
RIM think about it.
Make our Develooper's life Easy.
06-13-2012 11:55 AM
The only way to do this is to get all timezones that the device supports and put them into a hashtable. The make the hastable as a key-value pair of the "retrieved timezone+short form of the corresponding timezone". And when the app runs, check which timezone is selected and appropriately display the shortname of the selected timezone.
This may be a tedious task to do, but I could figure out only this way and it worked really well. Remember, there might be some timezones added in the latest OS versions which may not be available on older devices.