Opened 2 years ago

Last modified 15 months ago

#2016 accepted task

Review and improve date format strings

Reported by: str4d Owned by: zzz
Priority: minor Milestone: 0.9.36
Component: apps/console Version: 0.9.30
Keywords: i18n usability time easy Cc:
Parent Tickets: Sensitive: no

Description

http://trac.i2p2.i2p/ticket/1996#comment:15

The issue is not only translation but also formatting. We don't ever set the Locale in the JVM. You can either create a locale for the current translation setting (which we don't usually do) or use the JVM's Locale. To test with other locales, start the JVM with a command line option.

For simple format specs, it's been fine to specify them, but for longer ones, we risk it looking strange to some users as we impose what looks "right" to us. In that case, it's better to use the Locale-specific builtins.

If you like we can make a pass through the whole codebase grepping for SimpleDateFormat and trying to ensure even more consistency in formatting, translation, and timezone

There are several parts to this:

  • Review usage of SimpleDateFormat and collate all the date format strings we use.
  • Propose and implement usage-appropriate date format strings that are user-friendly and consistent.
  • (Slightly harder) Implement localization of date format strings.

Subtickets

Change History (4)

comment:1 Changed 2 years ago by zzz

Milestone: undecided0.9.32
Status: newopen

The best practices we have now is to use either:

  • DateFormat?.SHORT for date and DateFormat?.MEDIUM for time, or
  • SimpleDateFormat? with yyyy-MM-dd (and/or) HH:mm:ss, which is pretty much the same thing as SHORT date and MEDIUM time, for many locales anyway.

There's very few spots in the code for user-visible dates that use something different from those two.

My issue in #1996 comment 15 is the change went *widely* off-script from these two best practices, and that could easily be fixed before the .31 release, should you care to do so.

For reference, here's sample output for each format, for each locale:

	DATE				TIME
Locale	short	med	long	full	short	med	long	full
	7/19/17	Jul 19, 2017	July 19, 2017	Wednesday, July 19, 2017	3:27 PM	3:27:23 PM	3:27:23 PM UTC	3:27:23 PM UTC
ar	19/07/17	19/07/2017	19 يوليو, 2017	19 يوليو, 2017	03:27 م	03:27:23 م	UTC 03:27:23 م	UTC 03:27:23 م
ar_AE	19/07/17	19/07/2017	19 يوليو, 2017	19 يوليو, 2017	03:27 م	03:27:23 م	UTC 03:27:23 م	UTC 03:27:23 م
ar_BH	19/07/17	19/07/2017	19 يوليو, 2017	19 يوليو, 2017	03:27 م	03:27:23 م	UTC 03:27:23 م	UTC 03:27:23 م
ar_DZ	19/07/17	19/07/2017	19 يوليو, 2017	19 يوليو, 2017	03:27 م	03:27:23 م	UTC 03:27:23 م	UTC 03:27:23 م
ar_EG	19/07/17	19/07/2017	19 يوليو, 2017	19 يوليو, 2017	03:27 م	03:27:23 م	UTC 03:27:23 م	UTC 03:27:23 م
ar_IQ	19/07/17	19/07/2017	19 يوليو, 2017	19 يوليو, 2017	03:27 م	03:27:23 م	UTC 03:27:23 م	UTC 03:27:23 م
ar_JO	19/07/17	19/07/2017	19 تموز, 2017	19 تموز, 2017	03:27 م	03:27:23 م	UTC 03:27:23 م	UTC 03:27:23 م
ar_KW	19/07/17	19/07/2017	19 يوليو, 2017	19 يوليو, 2017	03:27 م	03:27:23 م	UTC 03:27:23 م	UTC 03:27:23 م
ar_LB	19/07/17	19/07/2017	19 تموز, 2017	19 تموز, 2017	03:27 م	03:27:23 م	UTC 03:27:23 م	UTC 03:27:23 م
ar_LY	19/07/17	19/07/2017	19 يوليو, 2017	19 يوليو, 2017	03:27 م	03:27:23 م	UTC 03:27:23 م	UTC 03:27:23 م
ar_MA	19/07/17	19/07/2017	19 يوليو, 2017	19 يوليو, 2017	03:27 م	03:27:23 م	UTC 03:27:23 م	UTC 03:27:23 م
ar_OM	19/07/17	19/07/2017	19 يوليو, 2017	19 يوليو, 2017	03:27 م	03:27:23 م	UTC 03:27:23 م	UTC 03:27:23 م
ar_QA	19/07/17	19/07/2017	19 يوليو, 2017	19 يوليو, 2017	03:27 م	03:27:23 م	UTC 03:27:23 م	UTC 03:27:23 م
ar_SA	19/07/17	19/07/2017	19 يوليو, 2017	19 يوليو, 2017	03:27 م	03:27:23 م	UTC 03:27:23 م	UTC 03:27:23 م
ar_SD	19/07/17	19/07/2017	19 يوليو, 2017	19 يوليو, 2017	03:27 م	03:27:23 م	UTC 03:27:23 م	UTC 03:27:23 م
ar_SY	19/07/17	19/07/2017	19 تموز, 2017	19 تموز, 2017	03:27 م	03:27:23 م	UTC 03:27:23 م	UTC 03:27:23 م
ar_TN	19/07/17	19/07/2017	19 يوليو, 2017	19 يوليو, 2017	03:27 م	03:27:23 م	UTC 03:27:23 م	UTC 03:27:23 م
ar_YE	19/07/17	19/07/2017	19 يوليو, 2017	19 يوليو, 2017	03:27 م	03:27:23 م	UTC 03:27:23 م	UTC 03:27:23 م
be	19.7.17	19.7.2017	серада, 19, ліпеня 2017	серада, 19, ліпеня 2017	15.27	15.27.23	15.27.23 UTC	15.27.23 UTC
be_BY	19.7.17	19.7.2017	серада, 19, ліпеня 2017	серада, 19, ліпеня 2017	15.27	15.27.23	15.27.23 UTC	15.27.23 UTC
bg	19.07.17	19.07.2017	19 Юли 2017	19 Юли 2017, Сряда	15:27	15:27:23	15:27:23 UTC	15:27:23 Coordinated Universal Time
bg_BG	19.07.17	19.07.2017	19 Юли 2017	19 Юли 2017, Сряда	15:27	15:27:23	15:27:23 UTC	15:27:23 Coordinated Universal Time
ca	19/07/17	19/07/2017	19 / de juliol / 2017	dimecres, 19 / de juliol / 2017	15:27	15:27:23	15:27:23 UTC	15:27:23 UTC
ca_ES	19/07/17	19/07/2017	19 / de juliol / 2017	dimecres, 19 / de juliol / 2017	15:27	15:27:23	15:27:23 UTC	15:27:23 UTC
cs	19.7.17	19.7.2017	19. července 2017	Středa, 19. července 2017	15:27	15:27:23	15:27:23 UTC	15:27:23 UTC
cs_CZ	19.7.17	19.7.2017	19. července 2017	Středa, 19. července 2017	15:27	15:27:23	15:27:23 UTC	15:27:23 UTC
da	19-07-17	19-07-2017	19. juli 2017	19. juli 2017	15:27	15:27:23	15:27:23 UTC	15:27:23 UTC
da_DK	19-07-17	19-07-2017	19. juli 2017	19. juli 2017	15:27	15:27:23	15:27:23 UTC	15:27:23 UTC
de	19.07.17	19.07.2017	19. Juli 2017	Mittwoch, 19. Juli 2017	15:27	15:27:23	15:27:23 UTC	15:27 Uhr UTC
de_AT	19.07.17	19.07.2017	19. Juli 2017	Mittwoch, 19. Juli 2017	15:27	15:27:23	15:27:23 UTC	15:27 Uhr UTC
de_CH	19.07.17	19.07.2017	19. Juli 2017	Mittwoch, 19. Juli 2017	15:27	15:27:23	15:27:23 UTC	15:27 Uhr UTC
de_DE	19.07.17	19.07.2017	19. Juli 2017	Mittwoch, 19. Juli 2017	15:27	15:27:23	15:27:23 UTC	15:27 Uhr UTC
de_GR	19.07.17	19.07.2017	19. Juli 2017	Mittwoch, 19. Juli 2017	15:27	15:27:23	15:27:23 UTC	15:27 Uhr UTC
de_LU	19.07.17	19.07.2017	19. Juli 2017	Mittwoch, 19. Juli 2017	15:27	15:27:23	15:27:23 UTC	15:27 Uhr UTC
el	19/7/2017	19 Ιουλ 2017	19 Ιουλίου 2017	Τετάρτη, 19 Ιουλίου 2017	3:27 μμ	3:27:23 μμ	3:27:23 μμ UTC	3:27:23 μμ UTC
el_CY	19/07/2017	19 Ιουλ 2017	19 Ιούλιος 2017	Τετάρτη, 19 Ιούλιος 2017	3:27 ΜΜ	3:27:23 ΜΜ	3:27:23 ΜΜ UTC	3:27:23 ΜΜ UTC
el_GR	19/7/2017	19 Ιουλ 2017	19 Ιουλίου 2017	Τετάρτη, 19 Ιουλίου 2017	3:27 μμ	3:27:23 μμ	3:27:23 μμ UTC	3:27:23 μμ UTC
en	7/19/17	Jul 19, 2017	July 19, 2017	Wednesday, July 19, 2017	3:27 PM	3:27:23 PM	3:27:23 PM UTC	3:27:23 PM UTC
en_AU	19/07/17	19/07/2017	19 July 2017	Wednesday, 19 July 2017	3:27 PM	3:27:23 PM	3:27:23 PM	3:27:23 PM UTC
en_CA	19/07/17	19-Jul-2017	July 19, 2017	Wednesday, July 19, 2017	3:27 PM	3:27:23 PM	3:27:23 UTC PM	3:27:23 o'clock PM UTC
en_GB	19/07/17	19-Jul-2017	19 July 2017	Wednesday, 19 July 2017	15:27	15:27:23	15:27:23 UTC	15:27:23 o'clock UTC
en_IE	19/07/17	19-Jul-2017	19 July 2017	19 July 2017	15:27	15:27:23	15:27:23 UTC	15:27:23 o'clock UTC
en_IN	19/7/17	19 Jul, 2017	19 July, 2017	Wednesday, 19 July, 2017	3:27 PM	3:27:23 PM	3:27:23 PM UTC	3:27:23 PM UTC
en_MT	19/07/2017	19 Jul 2017	19 July 2017	Wednesday, 19 July 2017	15:27	15:27:23	15:27:23 UTC	15:27:23 UTC
en_NZ	19/07/17	19/07/2017	19 July 2017	Wednesday, 19 July 2017	3:27 PM	3:27:23 PM	3:27:23 PM	3:27:23 PM UTC
en_PH	7/19/17	07 19, 17	July 19, 2017	Wednesday, July 19, 2017	3:27 PM	3:27:23 PM	3:27:23 PM UTC	3:27:23 PM UTC
en_SG	19/7/17	19 Jul, 2017	19 July, 2017	Wednesday, 19 July, 2017	3:27 PM	3:27:23 PM	3:27:23 PM UTC	3:27:23 PM UTC
en_US	7/19/17	Jul 19, 2017	July 19, 2017	Wednesday, July 19, 2017	3:27 PM	3:27:23 PM	3:27:23 PM UTC	3:27:23 PM UTC
en_ZA	2017/07/19	19 Jul 2017	19 July 2017	Wednesday 19 July 2017	3:27 PM	3:27:23 PM	3:27:23 PM	3:27:23 PM
es	19/07/17	19-jul-2017	19 de julio de 2017	miércoles 19 de julio de 2017	15:27	15:27:23	15:27:23 UTC	15H27' UTC
es_AR	19/07/17	19/07/2017	19 de julio de 2017	miércoles 19 de julio de 2017	15:27	15:27:23	15:27:23 UTC	15h'27 UTC
es_BO	19-07-17	19-07-2017	19 de julio de 2017	miércoles 19 de julio de 2017	03:27 PM	03:27:23 PM	03:27:23 PM UTC	03:27:23 PM UTC
es_CL	19-07-17	19-07-2017	19 de julio de 2017	miércoles 19 de julio de 2017	15:27	15:27:23	15:27:23 UTC	15:27:23 Hora Universal Coordinada
es_CO	19/07/17	19/07/2017	19 de julio de 2017	miércoles 19 de julio de 2017	03:27 PM	03:27:23 PM	03:27:23 PM UTC	03:27:23 PM UTC
es_CR	19/07/17	19/07/2017	19 de julio de 2017	miércoles 19 de julio de 2017	03:27 PM	03:27:23 PM	03:27:23 PM UTC	03:27:23 PM UTC
es_CU	19/07/17	19-jul-2017	19 de julio de 2017	miércoles 19 de julio de 2017	15:27	15:27:23	15:27:23 UTC	15H27' UTC
es_DO	19/07/17	19/07/2017	19 de julio de 2017	miércoles 19 de julio de 2017	03:27 PM	03:27:23 PM	03:27:23 PM UTC	03:27:23 PM UTC
es_EC	19/07/17	19/07/2017	19 de julio de 2017	miércoles 19 de julio de 2017	15:27	15:27:23	15:27:23 UTC	15:27:23 Hora Universal Coordinada
es_ES	19/07/17	19-jul-2017	19 de julio de 2017	miércoles 19 de julio de 2017	15:27	15:27:23	15:27:23 UTC	15H27' UTC
es_GT	19/07/17	19/07/2017	19 de julio de 2017	miércoles 19 de julio de 2017	03:27 PM	03:27:23 PM	03:27:23 PM UTC	03:27:23 PM UTC
es_HN	07-19-17	07-19-2017	19 de julio de 2017	miércoles 19 de julio de 2017	03:27 PM	03:27:23 PM	03:27:23 PM UTC	03:27:23 PM UTC
es_MX	19/07/17	19/07/2017	19 de julio de 2017	miércoles 19 de julio de 2017	03:27 PM	03:27:23 PM	03:27:23 PM UTC	03:27:23 PM UTC
es_NI	07-19-17	07-19-2017	19 de julio de 2017	miércoles 19 de julio de 2017	03:27 PM	03:27:23 PM	03:27:23 PM UTC	03:27:23 PM UTC
es_PA	07/19/17	07/19/2017	19 de julio de 2017	miércoles 19 de julio de 2017	03:27 PM	03:27:23 PM	03:27:23 PM UTC	03:27:23 PM UTC
es_PE	19/07/17	19/07/2017	19 de julio de 2017	miércoles 19 de julio de 2017	03:27 PM	03:27:23 PM	03:27:23 PM UTC	03:27:23 PM UTC
es_PR	07-19-17	07-19-2017	19 de julio de 2017	miércoles 19 de julio de 2017	03:27 PM	03:27:23 PM	03:27:23 PM UTC	03:27:23 PM UTC
es_PY	19/07/17	19/07/2017	19 de julio de 2017	miércoles 19 de julio de 2017	03:27 PM	03:27:23 PM	03:27:23 PM UTC	03:27:23 PM UTC
es_SV	07-19-17	07-19-2017	19 de julio de 2017	miércoles 19 de julio de 2017	03:27 PM	03:27:23 PM	03:27:23 PM UTC	03:27:23 PM UTC
es_US	7/19/17	jul 19, 2017	19 de julio de 2017	miércoles 19 de julio de 2017	3:27 p.m.	3:27:23 p.m.	3:27:23 p.m. UTC	3:27:23 p.m. UTC
es_UY	19/07/17	19/07/2017	19 de julio de 2017	miércoles 19 de julio de 2017	03:27 PM	03:27:23 PM	03:27:23 PM UTC	03:27:23 PM UTC
es_VE	19/07/17	19/07/2017	19 de julio de 2017	miércoles 19 de julio de 2017	03:27 PM	03:27:23 PM	03:27:23 PM UTC	03:27:23 PM UTC
et	19.07.17	19.07.2017	kolmapäev, 19. juuli 2017. a	kolmapäev, 19. juuli 2017	15:27	15:27:23	15:27:23 UTC	15:27:23 UTC
et_EE	19.07.17	19.07.2017	kolmapäev, 19. juuli 2017. a	kolmapäev, 19. juuli 2017	15:27	15:27:23	15:27:23 UTC	15:27:23 UTC
fi	19.7.2017	19.7.2017	19. heinäkuuta 2017	19. heinäkuuta 2017	15:27	15:27:23	klo 15.27.23	15.27.23 UTC
fi_FI	19.7.2017	19.7.2017	19. heinäkuuta 2017	19. heinäkuuta 2017	15:27	15:27:23	klo 15.27.23	15.27.23 UTC
fr	19/07/17	19 juil. 2017	19 juillet 2017	mercredi 19 juillet 2017	15:27	15:27:23	15:27:23 UTC	15 h 27 UTC
fr_BE	19/07/17	19-juil.-2017	19 juillet 2017	mercredi 19 juillet 2017	15:27	15:27:23	15:27:23 UTC	15 h 27 min 23 s UTC
fr_CA	17-07-19	2017-07-19	19 juillet 2017	mercredi 19 juillet 2017	15:27	15:27:23	15:27:23 UTC	15 h 27 UTC
fr_CH	19.07.17	19 juil. 2017	19. juillet 2017	mercredi, 19. juillet 2017	15:27	15:27:23	15:27:23 UTC	15.27. h UTC
fr_FR	19/07/17	19 juil. 2017	19 juillet 2017	mercredi 19 juillet 2017	15:27	15:27:23	15:27:23 UTC	15 h 27 UTC
fr_LU	19/07/17	19 juil. 2017	19 juillet 2017	mercredi 19 juillet 2017	15:27	15:27:23	15:27:23 UTC	15 h 27 UTC
ga	17/07/19	2017 Iúil 19	2017 Iúil 19	Dé Céadaoin, 2017 Iúil 19	15:27	15:27:23	15:27:23 UTC	15:27:23 UTC
ga_IE	19/07/2017	19 Iúil 2017	19 Iúil 2017	Dé Céadaoin 19 Iúil 2017	15:27	15:27:23	15:27:23 UTC	15:27:23 UTC
hi	7/19/17	Jul 19, 2017	July 19, 2017	Wednesday, July 19, 2017	3:27 PM	3:27:23 PM	3:27:23 PM UTC	3:27:23 PM UTC
hi_IN	१९/७/१७	१९ जुलाई, २०१७	१९ जुलाई, २०१७	बुधवार, १९ जुलाई, २०१७	३:२७ अपराह्न	३:२७:२३ अपराह्न	३:२७:२३ अपराह्न UTC	३:२७:२३ अपराह्न UTC
hr	2017.07.19	2017.07.19	2017. srpnja 19	2017. srpnja 19	15:27	15:27:23	15:27:23 UTC	15:27:23 UTC
hr_HR	19.07.17.	19.07.2017.	2017. srpnja 19	2017. srpnja 19	15:27	15:27:23	15:27:23 UTC	15:27:23 UTC
hu	2017.07.19.	2017.07.19.	2017. július 19.	2017. július 19.	15:27	15:27:23	15:27:23 UTC	15:27:23 UTC
hu_HU	2017.07.19.	2017.07.19.	2017. július 19.	2017. július 19.	15:27	15:27:23	15:27:23 UTC	15:27:23 UTC
in	17/07/19	2017 Jul 19	2017 Juli 19	Rabu, 2017 Juli 19	15:27	15:27:23	15:27:23 UTC	15:27:23 UTC
in_ID	19/07/17	19 Jul 17	19 Juli 2017	Rabu 19 Juli 2017	15:27	15:27:23	15:27:23	15:27:23
is	19.7.2017	19.7.2017	19. júlí 2017	19. júlí 2017	15:27	15:27:23	15:27:23 UTC	15:27:23 UTC
is_IS	19.7.2017	19.7.2017	19. júlí 2017	19. júlí 2017	15:27	15:27:23	15:27:23 UTC	15:27:23 UTC
it	19/07/17	19-lug-2017	19 luglio 2017	mercoledì 19 luglio 2017	15.27	15.27.23	15.27.23 UTC	15.27.23 UTC
it_CH	19.07.17	19-lug-2017	19. luglio 2017	mercoledì, 19. luglio 2017	15:27	15:27:23	15:27:23 UTC	15.27 h UTC
it_IT	19/07/17	19-lug-2017	19 luglio 2017	mercoledì 19 luglio 2017	15.27	15.27.23	15.27.23 UTC	15.27.23 UTC
iw	19/07/17	19/07/2017	19 יולי 2017	יום רביעי 19 יולי 2017	15:27	15:27:23	15:27:23 UTC	15:27:23 UTC
iw_IL	19/07/17	19/07/2017	19 יולי 2017	יום רביעי 19 יולי 2017	15:27	15:27:23	15:27:23 UTC	15:27:23 UTC
ja	17/07/19	2017/07/19	2017/07/19	2017年7月19日	15:27	15:27:23	15:27:23 UTC	15時27分23秒 UTC
ja_JP	17/07/19	2017/07/19	2017/07/19	2017年7月19日	15:27	15:27:23	15:27:23 UTC	15時27分23秒 UTC
ja_JP_JP_#u-ca-japanese	H29.07.19	H29.07.19	H29.07.19	平成29年7月19日	15:27	15:27:23	15:27:23 UTC	15時27分23秒 UTC
ko	17. 7. 19	2017. 7. 19	2017년 7월 19일 (수)	2017년 7월 19일 수요일	오후 3:27	오후 3:27:23	오후 3시 27분 23초	오후 3시 27분 23초 UTC
ko_KR	17. 7. 19	2017. 7. 19	2017년 7월 19일 (수)	2017년 7월 19일 수요일	오후 3:27	오후 3:27:23	오후 3시 27분 23초	오후 3시 27분 23초 UTC
lt	17.7.19	2017-07-19	Trečiadienis, 2017, liepa 19	Trečiadienis, 2017, liepa 19	15.27	15.27.23	15.27.23 UTC	15.27.23 UTC
lt_LT	17.7.19	2017-07-19	Trečiadienis, 2017, liepa 19	Trečiadienis, 2017, liepa 19	15.27	15.27.23	15.27.23 UTC	15.27.23 UTC
lv	17.19.7	2017.19.7	trešdiena, 2017, 19 jūlijs	trešdiena, 2017, 19 jūlijs	15:27	15:27:23	15:27:23 UTC	15:27:23 UTC
lv_LV	17.19.7	2017.19.7	trešdiena, 2017, 19 jūlijs	trešdiena, 2017, 19 jūlijs	15:27	15:27:23	15:27:23 UTC	15:27:23 UTC
mk	19.7.17	19.7.2017	19, јули 2017	среда, 19, јули 2017	15:27	15:27:	15:27:23 UTC	15:27:23 UTC
mk_MK	19.7.17	19.7.2017	19, јули 2017	среда, 19, јули 2017	15:27	15:27:	15:27:23 UTC	15:27:23 UTC
ms	17/07/19	2017 Jul 19	2017 Julai 19	Rabu, 2017 Julai 19	15:27	15:27:23	15:27:23 UTC	15:27:23 UTC
ms_MY	19/07/2017	19 Julai 2017	19 Julai 2017	Rabu 19 Jul 2017	3:27	3:27:23 PM	3:27:23 PM UTC	3:27:23 PM UTC
mt	19/07/2017	19 Lul 2017	19 ta’ Lulju 2017	L-Erbgħa, 19 ta’ Lulju 2017	15:27	15:27:23	15:27:23 UTC	15:27:23 UTC
mt_MT	19/07/2017	19 Lul 2017	19 ta’ Lulju 2017	L-Erbgħa, 19 ta’ Lulju 2017	15:27	15:27:23	15:27:23 UTC	15:27:23 UTC
nl	19-7-17	19-jul-2017	19 juli 2017	woensdag 19 juli 2017	15:27	15:27:23	15:27:23 UTC	15:27:23 uur UTC
nl_BE	19/07/17	19-jul-2017	19 juli 2017	woensdag 19 juli 2017	15:27	15:27:23	15:27:23 UTC	15.27 u. UTC
nl_NL	19-7-17	19-jul-2017	19 juli 2017	woensdag 19 juli 2017	15:27	15:27:23	15:27:23 UTC	15:27:23 uur UTC
no	19.07.17	19.jul.2017	19. juli 2017	19. juli 2017	15:27	15:27:23	15:27:23 UTC	kl 15.27 UTC
no_NO	19.07.17	19.jul.2017	19. juli 2017	19. juli 2017	15:27	15:27:23	15:27:23 UTC	kl 15.27 UTC
no_NO_NY	19.07.17	19.jul.2017	19. juli 2017	19. juli 2017	15:27	15:27:23	15:27:23 UTC	kl 15.27 UTC
pl	17-07-19	2017-07-19	19 lipca 2017	środa, 19 lipca 2017	15:27	15:27:23	15:27:23 UTC	15:27:23 UTC
pl_PL	19.07.17	2017-07-19	19 lipca 2017	środa, 19 lipca 2017	15:27	15:27:23	15:27:23 UTC	15:27:23 UTC
pt	19-07-2017	19/jul/2017	19 de Julho de 2017	Quarta-feira, 19 de Julho de 2017	15:27	15:27:23	15:27:23 UTC	15H27m UTC
pt_BR	19/07/17	19/07/2017	19 de Julho de 2017	Quarta-feira, 19 de Julho de 2017	15:27	15:27:23	15h27min23s UTC	15h27min23s UTC
pt_PT	19-07-2017	19/jul/2017	19 de Julho de 2017	Quarta-feira, 19 de Julho de 2017	15:27	15:27:23	15:27:23 UTC	15H27m UTC
ro	19.07.2017	19.07.2017	19 iulie 2017	19 iulie 2017	15:27	15:27:23	15:27:23 UTC	15:27:23 UTC
ro_RO	19.07.2017	19.07.2017	19 iulie 2017	19 iulie 2017	15:27	15:27:23	15:27:23 UTC	15:27:23 UTC
ru	19.07.17	19.07.2017	19 июля 2017 г.	19 июля 2017 г.	15:27	15:27:23	15:27:23 UTC	15:27:23 UTC
ru_RU	19.07.17	19.07.2017	19 июля 2017 г.	19 июля 2017 г.	15:27	15:27:23	15:27:23 UTC	15:27:23 UTC
sk	19.7.2017	19.7.2017	Streda, 2017, júla 19	Streda, 2017, júla 19	15:27	15:27:23	15:27:23 UTC	15:27:23 UTC
sk_SK	19.7.2017	19.7.2017	Streda, 2017, júla 19	Streda, 2017, júla 19	15:27	15:27:23	15:27:23 UTC	15:27:23 UTC
sl	19.7.2017	19.7.2017	19. julij 2017	Sreda, 19. julij 2017	15:27	15:27:23	15:27:23 UTC	15:27:23 UTC
sl_SI	19.7.2017	19.7.2017	19. julij 2017	Sreda, 19. julij 2017	15:27	15:27:23	15:27:23 UTC	15:27:23 UTC
sq	17-07-19	2017-07-19	2017-07-19	2017-07-19	3.27.MD	3:27:23.MD	3.27.23.MD UTC	3.27.23.MD UTC
sq_AL	17-07-19	2017-07-19	2017-07-19	2017-07-19	3.27.MD	3:27:23.MD	3.27.23.MD UTC	3.27.23.MD UTC
sr	19.7.17.	19.07.2017.	19.07.2017.	среда, 19.јул.2017.	15.27	15.27.23	15.27.23 UTC	15.27.23 UTC
sr_BA	17-07-19	2017-07-19	19. јули 2017.	сриједа, 19. јули 2017.	15:27	15:27:23	15.27.23 UTC	15 часова, 27 минута, 23 секунди
sr_BA_#Latn	19.7.17.	19.07.2017.	19. jul 2017.	sreda, 19. jul 2017.	15.27	15.27.23	15.27.23 UTC	15.27.23 Coordinated Universal Time
sr_CS	19.7.17.	19.07.2017.	19.07.2017.	среда, 19.јул.2017.	15.27	15.27.23	15.27.23 UTC	15.27.23 UTC
sr_ME	19.7.17.	19.07.2017.	19.07.2017.	среда, 19.јул.2017.	15.27	15.27.23	15.27.23 UTC	15.27.23 UTC
sr_ME_#Latn	19.7.17.	19.07.2017.	19.07.2017.	sreda, 19. jul 2017.	15.27	15.27.23	15.27.23 UTC	15.27.23 Coordinated Universal Time
sr_RS	19.7.17.	19.07.2017.	19.07.2017.	среда, 19.јул.2017.	15.27	15.27.23	15.27.23 UTC	15.27.23 UTC
sr_RS_#Latn	19.7.17.	19.07.2017.	19. jul 2017.	sreda, 19. jul 2017.	15.27	15.27.23	15.27.23 UTC	15.27.23 Coordinated Universal Time
sr__#Latn	19.7.17.	19.07.2017.	19. jul 2017.	sreda, 19. jul 2017.	15.27	15.27.23	15.27.23 UTC	15.27.23 Coordinated Universal Time
sv	2017-07-19	2017-jul-19	den 19 juli 2017	den 19 juli 2017	15:27	15:27:23	15:27:23 UTC	kl 15:27 UTC
sv_SE	2017-07-19	2017-jul-19	den 19 juli 2017	den 19 juli 2017	15:27	15:27:23	15:27:23 UTC	kl 15:27 UTC
th	19/7/2017	19 ก.ค. 2017	19 กรกฎาคม 2017	วันพุธที่ 19 กรกฎาคม ค.ศ. 2017	15:27 น.	15:27:23	15 นาฬิกา 27 นาที	15 นาฬิกา 27 นาที 23 วินาที
th_TH	19/7/2560	19 ก.ค. 2560	19 กรกฎาคม 2560	วันพุธที่ 19 กรกฎาคม พ.ศ. 2560	15:27 น.	15:27:23	15 นาฬิกา 27 นาที	15 นาฬิกา 27 นาที 23 วินาที
th_TH_TH_#u-nu-thai	๑๙/๗/๒๕๖๐	๑๙ ก.ค. ๒๕๖๐	๑๙ กรกฎาคม ๒๕๖๐	วันพุธที่ ๑๙ กรกฎาคม พ.ศ. ๒๕๖๐	๑๕:๒๗ น.	๑๕:๒๗:๒๓	๑๕ นาฬิกา ๒๗ นาที	๑๕ นาฬิกา ๒๗ นาที ๒๓ วินาที
tr	19.07.2017	19.Tem.2017	19 Temmuz 2017 Çarşamba	19 Temmuz 2017 Çarşamba	15:27	15:27:23	15:27:23 UTC	15:27:23 UTC
tr_TR	19.07.2017	19.Tem.2017	19 Temmuz 2017 Çarşamba	19 Temmuz 2017 Çarşamba	15:27	15:27:23	15:27:23 UTC	15:27:23 UTC
uk	19.07.17	19 лип. 2017	19 липня 2017	середа, 19 липня 2017 р.	15:27	15:27:23	15:27:23 UTC	15:27:23 UTC
uk_UA	19.07.17	19 лип. 2017	19 липня 2017	середа, 19 липня 2017 р.	15:27	15:27:23	15:27:23 UTC	15:27:23 UTC
vi	19/07/2017	19-07-2017	Ngày 19 tháng 7 năm 2017	Thứ tư, ngày 19 tháng bảy năm 2017	15:27	15:27:23	15:27:23 UTC	15:27:23 UTC
vi_VN	19/07/2017	19-07-2017	Ngày 19 tháng 7 năm 2017	Thứ tư, ngày 19 tháng bảy năm 2017	15:27	15:27:23	15:27:23 UTC	15:27:23 UTC
zh	17-7-19	2017-7-19	2017年7月19日	2017年7月19日 星期三	下午3:27	15:27:23	下午03时27分23秒	下午03时27分23秒 UTC
zh_CN	17-7-19	2017-7-19	2017年7月19日	2017年7月19日 星期三	下午3:27	15:27:23	下午03时27分23秒	下午03时27分23秒 UTC
zh_HK	17年7月19日	2017年7月19日	2017年07月19日 星期三	2017年07月19日 星期三	下午3:27	下午03:27:23	下午03時27分23秒	下午03時27分23秒 UTC
zh_SG	19/07/17	19-七月-17	19 七月 2017	19 七月 2017	下午 03:27	下午 03:27	下午 03:27:23	下午 03:27:23
zh_TW	2017/7/19	2017/7/19	2017年7月19日	2017年7月19日 星期三	下午 3:27	下午 03:27:23	下午03時27分23秒	下午03時27分23秒 UTC

The formatting we use _is_ localized. But it uses the JVM's locale, not the language configured in the console. That's a conscious decision, not an accident, but we could reconsider it.

We could, perhaps, add utility methods to DataHelper? or SystemVersion? to return the date, time, or datetime, in the local timezone and/or UTC. Might be helpful, might not. Whether the 1st or 2nd 'best practice' is the actual 'best' really affects, for example, how it looks in the US English locale - are you a MM/dd/yy hater or not. But to force YYYY-mm-dd on all locales may not be ideal either, as the chart above shows.

Also, took me a second, but 'collate' in OP 1st bullet means 'gather', not 'locale-dependent sorting'

comment:2 Changed 18 months ago by zzz

Milestone: 0.9.320.9.34

@str4d awaiting your response, suggestions, or proposal, let's do whatever we're going to do for .34

comment:3 Changed 15 months ago by zzz

Milestone: 0.9.340.9.36
Owner: set to zzz
Status: openaccepted

comment:4 Changed 15 months ago by Reportage

On a related note, the time formatting on /logs has 3 different variations; standardizing to a single format there would be an improvement.

Note: See TracTickets for help on using tickets.