You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "Pierre Smits (JIRA)" <ji...@apache.org> on 2018/12/16 08:47:00 UTC

[jira] [Commented] (OFBIZ-10152) Use properties for hard-coded date/time strings

    [ https://issues.apache.org/jira/browse/OFBIZ-10152?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16722421#comment-16722421 ] 

Pierre Smits commented on OFBIZ-10152:
--------------------------------------

I would say this is part of a bigger issue (namely correct formatting of date, time and numbers (both monetary amounts and others).

Having this defined in and retrieved from a properties file is good for the 'default', but when considering multiple internal organisations in different countries that can be used as a primary accounting entity, it is foreseeable that employees of such countries are accustomed to having the bulk of their invoices, orders, shipping manifests, inventory documents with dates, time and numbers in a format in accordance to their country.

And it is imaginable that when dealing with parties across the border the format of date/time and amounts of documents sent to the external parties are catered to their locale/custom/etc. so that the risk of misunderstanding is minimised. 

It would be a good thing for the adopters, when such flexibility were to be addressed in stead of just having one mandatory default that must be applied to all.


Since we're talking about how date, time and numbers are displayed in widgets and templates (it is not about how these values are persisted in the underlying RDBMS) the format of how these are shown is dependent on the choices made for the internal companies (and the individual users), and should be set/retrieved in such fashion.

> Use properties for hard-coded date/time strings 
> ------------------------------------------------
>
>                 Key: OFBIZ-10152
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-10152
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: ALL COMPONENTS
>    Affects Versions: Trunk
>            Reporter: Jacques Le Roux
>            Assignee: Jacques Le Roux
>            Priority: Minor
>
> This refers to a suggestion from Adrian at http://markmail.org/message/bldm5eajql4in3yg
> {quote}
> The current OFBiz framework supports a user-selected locale and time 
> zone. There are places in the UI where those settings are ignored and 
> date/time strings are hard-coded to the yyyy-MM-dd HH:mm:ss.SSS format. 
> That was a design decision made by the developer community.
> Most of the framework code uses a formatting string constant found in 
> UtilDateTime.java:
> public static final String DATE_TIME_FORMAT = "yyyy-MM-dd HH:mm:ss.SSS";
> If you want to change the date/time format, that would be place to do it.
> It would be best to have those format strings loaded from a properties 
> file, so that users like yourself can change it easily - without having 
> to modify framework code. Anyone wanting to work on that improvement can 
> submit a patch to Jira and I would be happy to review and commit it.
> -Adrian
> {quote}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)