You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Mike Gillan (JIRA)" <de...@myfaces.apache.org> on 2007/05/09 04:31:15 UTC

[jira] Commented: (MYFACES-1159) GMT is not good default timezone in DateTimeConverter

    [ https://issues.apache.org/jira/browse/MYFACES-1159?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12494429 ] 

Mike Gillan commented on MYFACES-1159:
--------------------------------------

See here: http://wiki.apache.org/myfaces/FAQ#Date
I used <s:convertDateTime/> instead and it works properly using the server's local timezone.

> GMT is not good default timezone in DateTimeConverter
> -----------------------------------------------------
>
>                 Key: MYFACES-1159
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1159
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 1.1.1
>         Environment: Apache Tomcat 5.5.15, MyFaces 1.1.1, Hybernate 3
>            Reporter: Martin Beránek
>
> There is a problem with default time zone in DateTimeConverter.
> I want to display date (loaded from db through hibernate), for example: 1970-09-02/00:00:00  (java.util.Date). So dateTimeConverter decrease date by 1 hour and then display 1970-09-01/23:00:00. This is because after init the DateFormat contains time zone default for my host. The only workaround is manualy set local timezone in <f:convertDateTime timeZone="..." />. I thing, that the best solution is not set format.setTimeZone(tz) when user doesn't specify other timezone, or set localtimezone ( TimeZone.getDefault() ).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.