shadows/framework/src/main/java/org/robolectric/shadows/ShadowSettings.java
public static void set24HourTimeFormat(boolean use24HourTimeFormat) {
    Settings.System.putString(RuntimeEnvironment.application.getContentResolver(), Settings.System.TIME_12_24, use24HourTimeFormat ? "24" : "12");
  }
public static void set24HourTimeFormat(boolean use24HourTimeFormat) {
    Settings.System.putString(RuntimeEnvironment.application.getContentResolver(), Settings.System.TIME_12_24, use24HourTimeFormat ? "24" : "12");
  }
Sets the value of the {@link Settings.System#TIME_12_24} setting.

@param use24HourTimeFormat new status for the time setting