如何在 Eclipse 中设置“团队 - 历史记录”视图的日期格式?

发布于 2024-09-14 02:30:45 字数 289 浏览 6 评论 0原文

有谁知道如何在 Eclipse 中设置“团队 - 历史记录”视图的日期格式?我们正在使用 Subversive SVN 插件,但它似乎并不特定于该插件。之前曾提出过类似的堆栈溢出问题,但答案并不理想。

历史记录视图当前显示版本的日期为:8/9/10(这基本上没有用),除非您有很多版本并且可以根据之前和后续版本来解读它。

这与 Windows XP 区域日期设置无关,因为我们尝试更改“短日期格式”,但似乎没有效果。

Does anyone know how to set the date format for the Team - History view in Eclipse? We are using the Subversive SVN plug-in but it doesn't seem to be specific to that plug-in. A Similar Stack Overflow Question was asked before but the answer was not really desirable.

The History view currently displays the date of a version as: 8/9/10 (which is basically useless) unless you have many versions and can decipher it bases on previous and subsequent versions.

This is independent of the Windows XP regional date settings as we have tried changing the "short date format" and it seems to have no effect.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

情深已缘浅 2024-09-21 02:30:48

在 Indigo 中,您可以转到“设置”>团队> SVN>日期格式并指定自定义日期格式。

例如 yyyy.MM.dd HH:mm 给出 2011.10.29 19:32

在 Juno 中,日期格式字段位于“Settings>”中团队> SVN>标签装饰品。

在 Kepler 中,日期格式字段位于“设置”>“日期格式”中。团队> SVN>标签装饰/文字。

在 Mars 中,日期格式字段位于“首选项”>“日期格式”中。团队> SVN>查看设置。

In Indigo you can go to Settings> Team> SVN> Date Formats and specify a custom date format.

For example yyyy.MM.dd HH:mm gives 2011.10.29 19:32

In Juno the Date Format field is in Settings> Team> SVN> Label Decorations.

In Kepler the Date Format field is in Settings> Team> SVN> Label Decorations/Text.

In Mars the Date Format field is in Preferences> Team> SVN> View Settings.

混吃等死 2024-09-21 02:30:48

除了设置 Eclipse 运行的 JVM 区域设置之外,似乎没有其他方法可以设置此视图的日期格式。但对于许多语言环境,您必须设置语言和国家/地区。 eclipse.ini 的以下条目生成所需的结果 yyyy-mm-dd HH.MM

-Duser.language=sv
-Duser.country=SE

您可以通过运行以下代码来选择日期格式:

public void testDateFormat() {
    for (Locale locale : Locale.getAvailableLocales()) {
        DateFormat formatter = DateFormat.getDateInstance(DateFormat.SHORT, locale);
        System.out.println(locale.toString() + ": " + formatter.format(Calendar.getInstance().getTime()));
    }
}

但我将为读者省去一些麻烦并显示输出:

ar: 09/08/10
ar_AE: 09/08/10
ar_BH: 09/08/10
ar_DZ: 09/08/10
ar_EG: 09/08/10
ar_IQ: 09/08/10
ar_JO: 09/08/10
ar_KW: 09/08/10
ar_LB: 09/08/10
ar_LY: 09/08/10
ar_MA: 09/08/10
ar_OM: 09/08/10
ar_QA: 09/08/10
ar_SA: 09/08/10
ar_SD: 09/08/10
ar_SY: 09/08/10
ar_TN: 09/08/10
ar_YE: 09/08/10
be: 9.8.10
be_BY: 9.8.10
bg: 10-8-9
bg_BG: 10-8-9
ca: 09/08/10
ca_ES: 09/08/10
cs: 9.8.10
cs_CZ: 9.8.10
da: 09-08-10
da_DK: 09-08-10
de: 09.08.10
de_AT: 09.08.10
de_CH: 09.08.10
de_DE: 09.08.10
de_LU: 09.08.10
el: 9/8/2010
el_CY: 09/08/2010
el_GR: 9/8/2010
en: 8/9/10
en_AU: 9/08/10
en_CA: 09/08/10
en_GB: 09/08/10
en_IE: 09/08/10
en_IN: 9/8/10
en_MT: 09/08/2010
en_NZ: 9/08/10
en_PH: 8/9/10
en_SG: 8/9/10
en_US: 8/9/10
en_ZA: 10/08/09
es: 9/08/10
es_AR: 09/08/10
es_BO: 09-08-10
es_CL: 09-08-10
es_CO: 9/08/10
es_CR: 09/08/10
es_DO: 08/09/10
es_EC: 09/08/10
es_ES: 9/08/10
es_GT: 9/08/10
es_HN: 08-09-10
es_MX: 9/08/10
es_NI: 08-09-10
es_PA: 08/09/10
es_PE: 09/08/10
es_PR: 08-09-10
es_PY: 09/08/10
es_SV: 08-09-10
es_US: 8/9/10
es_UY: 09/08/10
es_VE: 09/08/10
et: 9.08.10
et_EE: 9.08.10
fi: 9.8.2010
fi_FI: 9.8.2010
fr: 09/08/10
fr_BE: 9/08/10
fr_CA: 10-08-09
fr_CH: 09.08.10
fr_FR: 09/08/10
fr_LU: 09/08/10
ga: 10/08/09
ga_IE: 09/08/2010
hi_IN: ?/?/??
hr: 2010.08.09
hr_HR: 2010.08.09
hu: 2010.08.09.
hu_HU: 2010.08.09.
in: 10/08/09
in_ID: 09/08/10
is: 9.8.2010
is_IS: 9.8.2010
it: 09/08/10
it_CH: 09.08.10
it_IT: 09/08/10
iw: 09/08/10
iw_IL: 09/08/10
ja: 10/08/09
ja_JP: 10/08/09
ja_JP_JP: H22.08.09
ko: 10. 8. 9
ko_KR: 10. 8. 9
lt: 10.8.9
lt_LT: 10.8.9
lv: 10.9.8
lv_LV: 10.9.8
mk: 9.8.10
mk_MK: 9.8.10
ms: 10/08/09
ms_MY: 09/08/2010
mt: 09/08/2010
mt_MT: 09/08/2010
nl: 9-8-10
nl_BE: 9/08/10
nl_NL: 9-8-10
no: 09.08.10
no_NO: 09.08.10
no_NO_NY: 09.08.10
pl: 10-08-09
pl_PL: 09.08.10
pt: 09-08-2010
pt_BR: 09/08/10
pt_PT: 09-08-2010
ro: 09.08.2010
ro_RO: 09.08.2010
ru: 09.08.10
ru_RU: 09.08.10
sk: 9.8.2010
sk_SK: 9.8.2010
sl: 9.8.10
sl_SI: 9.8.10
sq: 10-08-09
sq_AL: 10-08-09
sr: 9.8.10.
sr_BA: 10-08-09
sr_CS: 9.8.10.
sr_ME: 9.8.10.
sr_RS: 9.8.10.
sv: 2010-08-09
sv_SE: 2010-08-09
th: 8/9/10
th_TH: 9/8/2553
th_TH_TH: ?/?/????
tr: 09.08.2010
tr_TR: 09.08.2010
uk: 09.08.10
uk_UA: 09.08.10
vi: 09/08/2010
vi_VN: 09/08/2010
zh: 10-8-9
zh_CN: 10-8-9
zh_HK: 10?8?9?
zh_SG: 09/08/10
zh_TW: 2010/8/9

It looks like there is no way to set the date format for this view other than by setting the JVM locale in which Eclipse runs. But for many locales you have to set the language AND country. The following entries to eclipse.ini produce the desired result of yyyy-mm-dd HH.MM

-Duser.language=sv
-Duser.country=SE

You can select a date format by running the following code:

public void testDateFormat() {
    for (Locale locale : Locale.getAvailableLocales()) {
        DateFormat formatter = DateFormat.getDateInstance(DateFormat.SHORT, locale);
        System.out.println(locale.toString() + ": " + formatter.format(Calendar.getInstance().getTime()));
    }
}

but I'll save the reader some hassle and show the output:

ar: 09/08/10
ar_AE: 09/08/10
ar_BH: 09/08/10
ar_DZ: 09/08/10
ar_EG: 09/08/10
ar_IQ: 09/08/10
ar_JO: 09/08/10
ar_KW: 09/08/10
ar_LB: 09/08/10
ar_LY: 09/08/10
ar_MA: 09/08/10
ar_OM: 09/08/10
ar_QA: 09/08/10
ar_SA: 09/08/10
ar_SD: 09/08/10
ar_SY: 09/08/10
ar_TN: 09/08/10
ar_YE: 09/08/10
be: 9.8.10
be_BY: 9.8.10
bg: 10-8-9
bg_BG: 10-8-9
ca: 09/08/10
ca_ES: 09/08/10
cs: 9.8.10
cs_CZ: 9.8.10
da: 09-08-10
da_DK: 09-08-10
de: 09.08.10
de_AT: 09.08.10
de_CH: 09.08.10
de_DE: 09.08.10
de_LU: 09.08.10
el: 9/8/2010
el_CY: 09/08/2010
el_GR: 9/8/2010
en: 8/9/10
en_AU: 9/08/10
en_CA: 09/08/10
en_GB: 09/08/10
en_IE: 09/08/10
en_IN: 9/8/10
en_MT: 09/08/2010
en_NZ: 9/08/10
en_PH: 8/9/10
en_SG: 8/9/10
en_US: 8/9/10
en_ZA: 10/08/09
es: 9/08/10
es_AR: 09/08/10
es_BO: 09-08-10
es_CL: 09-08-10
es_CO: 9/08/10
es_CR: 09/08/10
es_DO: 08/09/10
es_EC: 09/08/10
es_ES: 9/08/10
es_GT: 9/08/10
es_HN: 08-09-10
es_MX: 9/08/10
es_NI: 08-09-10
es_PA: 08/09/10
es_PE: 09/08/10
es_PR: 08-09-10
es_PY: 09/08/10
es_SV: 08-09-10
es_US: 8/9/10
es_UY: 09/08/10
es_VE: 09/08/10
et: 9.08.10
et_EE: 9.08.10
fi: 9.8.2010
fi_FI: 9.8.2010
fr: 09/08/10
fr_BE: 9/08/10
fr_CA: 10-08-09
fr_CH: 09.08.10
fr_FR: 09/08/10
fr_LU: 09/08/10
ga: 10/08/09
ga_IE: 09/08/2010
hi_IN: ?/?/??
hr: 2010.08.09
hr_HR: 2010.08.09
hu: 2010.08.09.
hu_HU: 2010.08.09.
in: 10/08/09
in_ID: 09/08/10
is: 9.8.2010
is_IS: 9.8.2010
it: 09/08/10
it_CH: 09.08.10
it_IT: 09/08/10
iw: 09/08/10
iw_IL: 09/08/10
ja: 10/08/09
ja_JP: 10/08/09
ja_JP_JP: H22.08.09
ko: 10. 8. 9
ko_KR: 10. 8. 9
lt: 10.8.9
lt_LT: 10.8.9
lv: 10.9.8
lv_LV: 10.9.8
mk: 9.8.10
mk_MK: 9.8.10
ms: 10/08/09
ms_MY: 09/08/2010
mt: 09/08/2010
mt_MT: 09/08/2010
nl: 9-8-10
nl_BE: 9/08/10
nl_NL: 9-8-10
no: 09.08.10
no_NO: 09.08.10
no_NO_NY: 09.08.10
pl: 10-08-09
pl_PL: 09.08.10
pt: 09-08-2010
pt_BR: 09/08/10
pt_PT: 09-08-2010
ro: 09.08.2010
ro_RO: 09.08.2010
ru: 09.08.10
ru_RU: 09.08.10
sk: 9.8.2010
sk_SK: 9.8.2010
sl: 9.8.10
sl_SI: 9.8.10
sq: 10-08-09
sq_AL: 10-08-09
sr: 9.8.10.
sr_BA: 10-08-09
sr_CS: 9.8.10.
sr_ME: 9.8.10.
sr_RS: 9.8.10.
sv: 2010-08-09
sv_SE: 2010-08-09
th: 8/9/10
th_TH: 9/8/2553
th_TH_TH: ?/?/????
tr: 09.08.2010
tr_TR: 09.08.2010
uk: 09.08.10
uk_UA: 09.08.10
vi: 09/08/2010
vi_VN: 09/08/2010
zh: 10-8-9
zh_CN: 10-8-9
zh_HK: 10?8?9?
zh_SG: 09/08/10
zh_TW: 2010/8/9
喜爱皱眉﹌ 2024-09-21 02:30:48

尽管引用的问题说的是 OSX,但答案是相同的。在 Windows 上,有一个具有相同内容的 eclipse.ini 文件。添加这个:

-Duser.country=GB 

Even though the referenced question says OSX, the answer is the same. On Windows there is an eclipse.ini file with the same content. Add this:

-Duser.country=GB 
剪不断理还乱 2024-09-21 02:30:48

在 Kepler with subversive 中,设置位于

Window >首选项>团队> SVN

在“视图设置”选项卡上的“日期格式”下,选择“自定义日期”,输入yyyy-MM-dd HH:mm:ss Z。例如:2014-01-16 20:34:59 +0000

In Kepler with subversive the setting is at

Window > Preferences > Team > SVN

on the View Settings tab, under Date Formats, choose Custom Date, input yyyy-MM-dd HH:mm:ss Z. This yields, for example: 2014-01-16 20:34:59 +0000.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文