[
https://issues.apache.org/jira/browse/OFBIZ-2?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12493005 ]
Adrian Crum commented on OFBIZ-2:
---------------------------------
I forgot to mention the "userTzId" session attribute defaults to the server's time zone if no user preference is set.
After reviewing Vinay's patch and giving this a LOT of thought, I'm considering creating a separate class for localized date/time utilities. Here's why:
Putting two versions of the same methods in the UtilDateTime class could be confusing to developers who don't understand their differences. I had considered added the term "localized" to the method names, but I'm not sure that would be a clear enough distinction. If an entire class has the "localized" term in its name, and the methods have clear comments describing the differences, then there is less chance of the wrong methods being used. So, I would like to put Vinay's methods in its own class.
Comments are welcome.
> Add Timezone versions of functions in UtilDateTime
> --------------------------------------------------
>
> Key: OFBIZ-2
> URL:
https://issues.apache.org/jira/browse/OFBIZ-2> Project: OFBiz (The Open for Business Project)
> Issue Type: New Feature
> Components: framework
> Affects Versions: SVN trunk
> Environment: All
> Reporter: Vinay Agarwal
> Attachments: 06-06-21 Timezone.patch, tz_basic.patch
>
>
> I am starting to work with timezones. The first thing I came across is UtilDateTime's functions completely ignore timezones. I plan to create timezone versions of functions like getDayStart that will take a timezone id string or a TimeZone. I would not use any deprecated functions but do not plan to change their use in existing functions. I would appreciate suggestions.
> Regards,
> Vinay Agarwal
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.