#If java
import android.provider.Settings.Global;
import android.provider.Settings.System;
import android.provider.Settings.SettingNotFoundException;
public int DateTimeAuto(){
return android.provider.Settings.Global.getInt(getContentResolver(), android.provider.Settings.Global.AUTO_TIME, 0);
}
//For api 16 and below
public int DateTimeAutoOld(){
return android.provider.Settings.System.getInt(getContentResolver(), android.provider.Settings.System.AUTO_TIME, 0);
}
public int TimeZoneAuto() {
return android.provider.Settings.Global.getInt(getContentResolver(), android.provider.Settings.Global.AUTO_TIME_ZONE, 0);
}
// For API 16 and below
public int TimeZoneAutoOld() {
return android.provider.Settings.System.getInt(getContentResolver(), android.provider.Settings.System.AUTO_TIME_ZONE, 0);
}
#end if