How to set the date format for the Team - History view in Eclipse?
Asked Answered
C

4

15

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.

Chokebore answered 9/8, 2010 at 19:14 Comment(4)
possible duplicate of How do I set the Subclipse/Eclipse date format?Updraft
@Daniel: OP mentioned it but it wasn't helpful to his caseDraw
@Daniel, the poster considers that question but said the answer wasn't helpfulChangchangaris
I've reduced the scope of the linked question to reflect what the asker acceptedChangchangaris
V
21

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.

Venesection answered 11/10, 2011 at 11:50 Comment(3)
That doesn't exist with Subversive, likely this is Subclipse-specific.Tumbrel
@Tumbrel I currently use Subclipse (I find it far better than Subversive) so I can't verify. Thanks for the correction.Venesection
Hello, I'm running Eclipse version 2019-06 (4.12) and updating the Window>Preferences then Team> SVN> Label Decorations then Text tab does not update the date format in the history view. It does update the date format displayed in the Navigator. I tried updating the settings as indicated below, but that didn't change the date format either. -Duser.language=sv -Duser.country=SE Any new ideas on this?Moorefield
C
12

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
Chokebore answered 9/8, 2010 at 20:25 Comment(0)
M
1

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 
Millenarianism answered 9/8, 2010 at 19:19 Comment(3)
Technically, this is setting the locale, which is not really the desired effect. This will, however, have the effect of taking the date and turning it into dd/mm/yy rather than mm/dd/yy but both are equally useless with a date of 8/9/10 or 9/8/10. If you are working on a team with members from USA/Europe it would be nice to display this as yyyy-mm-dd to avoid confusion. If this field is hard coded to reference the locale, then I guess the answer is "no".Chokebore
gotta love the big-endian/little-middlian US date... not that European dates are much better ;)Quits
At least, Europeans now always write the year with four digits.Ceiba
S
1

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.

Silverman answered 16/1, 2014 at 20:36 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.