[jboss-user] [JBoss Seam] - Re: Problem with decrementing dates
anonymous wrote : Am I missing something here? Yes, you missed the post immediately above where I explained the functionality for allowing the user to choose his timezone! anonymous wrote : OK, there is now support for #{timeZone} and #{timeZoneSelector.select}. | | * the timezone defaults to the server timezone, but this can of course be overridden either in components.xml or via the UI | | * I have created which always uses the "Seam timezone", ie. #{timeZone}. | | * I have registered this as the *default converter* for java.util.Date, which eliminates a bunch of noisy date handling stuff in the view. AFAIK, there is no standard mechanism in HTTP for getting the users timezone, so we need to let them set it the first time, after which it can live in a cookie (if you so desire). Please refer to the Seam documentation, where this is discussed. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4016006#4016006 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4016006 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Problem with decrementing dates
costeen wouldn't that be just adding or subtracting hours from the GMT server time? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4016004#4016004 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4016004 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Problem with decrementing dates
Gavin, I don't think displaying the datetime in the Server's time zone to the end user is the best solution. I want the end user to see and enter datetimes in their own timezone and the server/database to handle everything in GMT. Actually, I really don't care what format the server handles it in as long as the end user views and enters dates in their own time zone. Wouldn't this be the functionality that most people would want? Otherwise the end user has to do timezone offset calculations in their head before entering their datetime. Am I missing something here? Thanks... View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4016002#4016002 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4016002 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Problem with decrementing dates
OK, there is now support for #{timeZone} and #{timeZoneSelector.select}. * the timezone defaults to the server timezone, but this can of course be overridden either in components.xml or via the UI * I have created which always uses the "Seam timezone", ie. #{timeZone}. * I have registered this as the *default converter* for java.util.Date, which eliminates a bunch of noisy date handling stuff in the view. Check the changes to the booking app to see how this is better. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3977709#3977709 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3977709 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Problem with decrementing dates
ie, this changeset: http://fisheye.jboss.com/changelog/JBoss/jboss-seam?cs=MAIN:gavin:20061011210119 Note that the booking demo used to display times in UTC. Now it displays times in the server timezone. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3977710#3977710 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3977710 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Problem with decrementing dates
http://jira.jboss.com/jira/browse/JBSEAM-405 View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3977592#3977592 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3977592 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Problem with decrementing dates
"[EMAIL PROTECTED]" wrote : Um do you mind if I just steal that code and put it in org.jboss.seam.core? | Not at all. "[EMAIL PROTECTED]" wrote : | Actually, if I did that, I should probably do a whole Timezone/TimezoneSelector thingy like what we have for locales... | I agree that the standard JSF behavior here is nuts. Or an alternative solution would be to introduce an which is smart enough to default to the default server timezone ... I vote for it ! With all that cookies stuff like in localeSelector and mybe rename defaultTimeZone to serverTimeZone and add posibility to set default timezone in timezoneselector to serverTimezone View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3977471#3977471 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3977471 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Problem with decrementing dates
Um do you mind if I just steal that code and put it in org.jboss.seam.core? Actually, if I did that, I should probably do a whole Timezone/TimezoneSelector thingy like what we have for locales... I agree that the standard JSF behavior here is nuts. Or an alternative solution would be to introduce an which is smart enough to default to the default server timezone ... View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3977332#3977332 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3977332 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Problem with decrementing dates
This is my solution: Component: | | @Name("defaultTimeZone") | @Scope(ScopeType.APPLICATION) | @Intercept(NEVER) | public class DefaultTimeZone { | /** | * @return default TimeZone | */ | @Unwrap | public TimeZone getDefaultTimeZone() { | return TimeZone.getDefault(); | } | } | Page: | | | It is easy to change for example to userTimeZone where timeZone is extracted from database or something like this View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3977198#3977198 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3977198 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Problem with decrementing dates
"bfo81" wrote : | | Maybe I had almost a pure monolog in this thread, but possibly it will be helpful for someone (and I can hardly believe I am the only one who will ever have this problem...) I've also encountered the same problem. Thanks for pointing me in the right direction! View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3977157#3977157 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3977157 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Problem with decrementing dates
right now i'm cunfrunted with this issue. did you get an elegant implementation? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3964845#3964845 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3964845 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Problem with decrementing dates
O... the JSF specs are the ones to lay the blame on. See http://wiki.apache.org/myfaces/FAQ#Date (section "Why are my dates displaying the wrong date/time"). Sorry, but overriding the standard server timezone is idiotic in my eyes. So you really must use a custom timezone in every convertDateTime tag or use the MyFaces Sandbox converter instead. Maybe I had almost a pure monolog in this thread, but possibly it will be helpful for someone (and I can hardly believe I am the only one who will ever have this problem...) View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3963526#3963526 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3963526 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Problem with decrementing dates
What can I say? It is a Java problem AND a JSF problem, so to say ;) I added -Duser.timezone=Europe/Berlin to JAVA_OPTS environment property. Now, System.getProperty("user.timezone") is Europe/Berlin TimeZone.getDefault().getID() is Europe/Berlin TimeZone.getDefault().getDisplayName() is Zentraleuropäische Zeit (Central European Time) and the offset is 360 ms (i.e. one hour) and useDaylight is true BUT in the DateTimeConverter class getTimeZone().getId() is GMT getTimeZone().getId() is Greenwich Zeit (Greenwich Time) the offset is 0, and useDaylight is false. Well, the JVM has the right timezone set, but JSF ignores it and falls back to Greenwich Mean Time. I think I got a big fat bone to pick with the Apache MyFaces staff ;). View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3963525#3963525 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3963525 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Problem with decrementing dates
Erm... I'm not sure if this is really a Java problem. Remember: shows the correct date. But the tags using a f:convertDateTime do it wrong. Maybe I'll try to implement my own DateConverter, then we'll see ;). View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3962883#3962883 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3962883 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Problem with decrementing dates
Erm... I'm not sure if this is really a Java problem. Remember: shows the correct date. But the tags using a f:convertDateTime do it wrong. Maybe I'll try to implement my own DateConverter, then we'll see ;). View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3962882#3962882 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3962882 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Problem with decrementing dates
Erm... I'm not sure if this is really a Java problem. Remember: shows the correct date. But the tags using a f:convertDateTime do it wrong. Maybe I'll try to implement my own DateConverter, then we'll see ;). View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3962882#3962882 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3962882 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Problem with decrementing dates
It's MyFaces 1.1.1 that came with JBoss JEMS Installer. But I tried it out with MyFaces 1.1.3 now and the problem persists (btw: with 1.1.3 sometimes I get a "IllegalStateException: No active application scope" in the server log, but the app still keeps working). Interresting: Some entities always have 23:00 and some always have 22:00. Always, even after restarting the application server. It's extremely weird and doesn't seem to make any sense. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3962779#3962779 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3962779 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Problem with decrementing dates
Well, the problem is not JSF specific. Java (like most programming languages) uses timestamps internally. This is useful for - well, timestamps. But it is not useful for birthdates etc. For java two persons born on the 1.1.1980 0:01:00.00 GMT+2 and 1.1.1980 0:01:00.00 GMT-2 are not born on the same day eventough the sane part of humanity would say that they are both born on the 1.1.1980. You can only avoid this by using an artificial timezone (that is utc) when dealing with dates. The only thing that suprises me is that the datetime converter use the local timezone instead of utc if no timezone is specified. I think this is a bug. Which JSF implementation do you use? Regards fhh View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3962611#3962611 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3962611 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Problem with decrementing dates
No one had to deal with that problem before? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3962279#3962279 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3962279 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Problem with decrementing dates
PS: I changed the timezone of my computer from GMT+1 to GMT-1, and now the date is regarded as 1976-07-04 01:00. So JSF really wants to perform a timezone adjustment. I know that there's a timeZone attribute for . But I think it's daft to artificially add this every time I use a date. Especially since client and server are running on the same machine here and sharing the same timezone. btw: Even the booking demo fails on my PC. If I enter a new booking from July 31st to August 1st everything is shown correctly on the confirm page, but the database entries are one day earlier. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3961898#3961898 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3961898 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user