Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

* fix bug 在4.3系统上当切换日期大于2038年的时候会直接跳转到1970 #335

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,6 @@ public class CaldroidFragment extends DialogFragment {
private static final int MONTH_YEAR_FLAG = DateUtils.FORMAT_SHOW_DATE
| DateUtils.FORMAT_NO_MONTH_DAY | DateUtils.FORMAT_SHOW_YEAR;

/**
* First day of month time
*/
private Time firstMonthTime = new Time();

/**
* Reuse formatter to print "MMMM yyyy" format
Expand Down Expand Up @@ -1024,10 +1020,9 @@ public boolean onItemLongClick(AdapterView<?> parent,
*/
protected void refreshMonthTitleTextView() {
// Refresh title view
firstMonthTime.year = year;
firstMonthTime.month = month - 1;
firstMonthTime.monthDay = 15;
long millis = firstMonthTime.toMillis(true);
Calendar c2 = Calendar.getInstance();
c2.set(year, month - 1, 15, 0, 0, 0);
long millis = c2.getTimeInMillis();

// This is the method used by the platform Calendar app to get a
// correctly localized month name for display on a wall calendar
Expand Down