The method Timezone.getOffset(int era, int year, int month, int day, int dayOfWeek, int milliseconds);
is an abstract class and one has to reference it from a implemented Timezone
subclass.
You're trying to access a non-static method statically, and the compiler is matching it to the abstract method.
The solution you're seeking of is:
int m=TimeZone.getDefault().getOffset(unix_time_at_midnight) ;
EDIT: Looking on TimeZone
on BlackBerry API, I see there is no getOffset(long date)
method, but getOffset(int era, int year, int month, int day, int dayOfWeek, int millis)
.
A possible solution might be:
Date d = new Date((unix_time*1000)/1000)
TimeZone tz = TimeZone.getDefault();
Calendar c = Calendar.getInstance(tz);
c.setTime(d);
int m = tz.getOffset(1, c.get(Calendar.YEAR), c.get(Calendar.MONTH), c.get(Calendar.DAY_OF_MONTH), c.get(Calendar.DAY_OF_WEEK), c.get(Calendar.MILLISECOND));