[Postfixadmin-devel] Final localized date patch
Brought to you by:
christian_boltz,
gingerdog
From: Ullrich v. B. <uz...@mu...> - 2016-12-27 14:47:16
|
I hope everbody had a nice christmas with lots of loot :) Attached is the final fix for the localized date display. It superseedes my last patch posted here. Description: The patch introduces two new functions that encapsulate the formatting of dates. They are: db_date_format() which returns the date format string for the database in use and db_date_column_query() which returns the part of an SQL query that asks for a timestamp column. The existing code for SQLite reused the date format for mysql, my patch fixes this by introducing a new language specific entry $PALANG['dateformat_sqlite'] which currently has the same value as $PALANG['dateformat_mysql']. Any other code is then rewritten to use db_date_column_query(). This simplifies the code in several places. As a result, dates are now always correctly localized without cluttering the php files with database specific code. An unwanted but unavoidable side result is that with the current PALANG contents, dates are now just dates without hours and minutes. This is not an error but a consequence of the current localization and easily correctable. I have some other changes in mind but will wait for comments / patch acceptance. Patch is attached because it's somewhat larger. Regards Uz -- Ullrich von Bassewitz uz...@mu... Encrypted email preferred PGP Key-Id: 29D93B10 |