【发布时间】:2014-06-21 11:08:53
【问题描述】:
我的代码:
SimpleDateFormat today= new SimpleDateFormat("E, MMM dd, yyyy");
TimeZone tz = TimeZone.getDefault();
today.setTimeZone(tz);
dt = today.format(c.getTimeInMillis());
time.setText("Today "+dt);
我的默认日期格式是 2014 年 5 月 5 日星期一
如果我将设备中的设置更改为格式:2014/12/31 那么我应该以 Mon, 2014, May 05 这样的格式获取我的日期 有没有可能,如果是的话怎么......?
【问题讨论】:
-
可能是 this SO-post 的副本。使用
Settings.System.DATE_FORMAT的公认答案是有希望的。 -
yes..same..but still..my dbt is we can set that date format to Mon, 2014, May 05 如果我选择我的设置日期格式为 2014/12/11
标签: android timezone simpledateformat