Question about android's time and date format
<p>There is some source code in android  about the Time and Date Format, 
 I need the lock screen will show time and date format when I set them in system.        Can the code achieve it ?</p>

<pre><code>public void onTimeChanged() {
    refreshTimeAndDateDisplay();}
private void refreshTimeAndDateDisplay() {
    mTimeFormat = DateFormat.getTimeFormat(getContext());
    m DateFormat = DateFormat.getDateFormat(get context())
    String mDate = mDateFormat.format(new java.util.Date());  
        }


public static final java.text.DateFormat getTimeFormat(Context context) {
    boolean b24 = is24HourFormat(context);
    int res;

    if (b24) {
        res = R.string.twenty_four_hour_time_format;
    } else {
        res = R.string.twelve_hour_time_format;
    }

    return new java.text.SimpleDateFormat(context.getString(res));
}

  public static final java.text.DateFormat getDateFormat(Context context) {
    String value = Settings.System.getString(context.getContentResolver(),
            Settings.System.DATE_FORMAT);
    return getDateFormatForSetting(context, value);
}
  public static java.text.DateFormat getDateFormatForSetting(Context context,
                                                           String value) {
    String format = getDateFormatStringForSetting(context, value);

    return new java.text.SimpleDateFormat(format);
}
</code></pre>
