J2sdk 1.4 Timezone bug?

Set timezone to be GMT and run this piece of code in j2sdk1.4,
     System.out.println(
       "ZONE_OFFSET 1: " + ((new GregorianCalendar()).get(Calendar.ZONE_OFFSET))
     System.out.println(
       "ZONE_OFFSET 2: " +
       ((new GregorianCalendar(1970, 0, 1)).get(Calendar.ZONE_OFFSET))
     System.out.println(
       "ZONE_OFFSET 3: " +
       ((new GregorianCalendar(1971, 9, 30)).get(Calendar.ZONE_OFFSET))
     System.out.println(
       "ZONE_OFFSET 4: " +
       ((new GregorianCalendar(1971, 10, 1)).get(Calendar.ZONE_OFFSET))
     System.out.println(
       "ZONE_OFFSET 5: " +
       ((new GregorianCalendar(1972, 0, 1)).get(Calendar.ZONE_OFFSET))
     );It will print:
ZONE_OFFSET 1: 0
ZONE_OFFSET 2: 3600000
ZONE_OFFSET 3: 3600000
ZONE_OFFSET 4: 0
ZONE_OFFSET 5: 0while in jdk1.3, it prints correct answers:
ZONE_OFFSET 1: 0
ZONE_OFFSET 2: 0
ZONE_OFFSET 3: 0
ZONE_OFFSET 4: 0
ZONE_OFFSET 5: 0Another strange thing is that in other timezone such as US EST, j2sdk1.4 will print the correct numbers after running the above code:
ZONE_OFFSET 1: -18000000
ZONE_OFFSET 2: -18000000
ZONE_OFFSET 3: -18000000
ZONE_OFFSET 4: -18000000
ZONE_OFFSET 5: -18000000It seems to be a bug in j2sdk1.4.
Help is appreciated.

There is no "default offset" for a Calendar. The
zone offset depends on the default time zone. The default zone in turn depends
on the host zone. There is no reason to expect the value of
Calendar.get(ZONE_OFFSET) to necessarily remain constant between releases or
even between machines in the same release or between runs on the same machine.

Similar Messages

  • ColdFusion Timezone Bug?

    I'm working with values of time in seconds and I've come across an odd bug and I'm hoping someone might explain if this is a bug or if this is some kind of timezone issue. I have code which calculates the difference, in seconds, between two fixed dates. ColdFusion gives me one answer, native Java methods give me a different answer. The difference is one hour which makes me think this is somehow related to timezone, but I can't figure out how to properly correct for this.
    Any insight would be greatly appreciated.
    Here's my sample code:
    <cfset variables.TimeZone = CreateObject( "java", "java.util.TimeZone" ) />
    <cfset variables.Calendar = CreateObject( "java", "java.util.Calendar" ).getInstance( variables.TimeZone.getTimeZone( "GMT" )) />
    <cfset variables.Calendar.set( 2010, 6, 20, 15, 40, 0 ) />
    <h1>Seconds from 01/01/1970 12:00 AM to 07/20/2010 3:40 PM</h1>
    <p>
        According to Java:
        <cfoutput>#Int( variables.Calendar.getTimeInMillis() / 1000 )#</cfoutput>
    </p>
    <p>
        According to ColdFusion:
        <cfoutput>#DateDiff( "s", "01/01/1970 12:00 AM", "07/20/2010 3:40 PM" )#</cfoutput>
    </p>

    what tz is the cf server in? not
    UTC i take it? on the server i'm working on today the tz is ITC (no DST)
    & i get:
    According
    to Java: 1279640400
    According to ColdFusion: 1279640400
    using your
    snippet.
    maybe
    this http://bit.ly/a9ZXss
    will have some insight for you.
    So if ColdFusion treats dates and times as in the local timezone, and my local timezone has DST, then I need to check and correct for that. And there's no simple (by "simple", I mean a native ColdFusion function that can handle this difference) solution?
    So I need to employ something like this:
    <cfset variables.timeDiff = DateDiff( "s", "01/01/1970 12:00 AM", "07/20/2010 3:40 PM" ) />
    <cfif GetTimeZoneInfo().isDSTon IS TRUE>
        <cfset variables.timeDiff = variables.timeDiff + 3600 />
    </cfif>
    <p>
        According to ColdFusion (Adjusted):
        <cfoutput>#variables.timeDiff#</cfoutput>
    </p>
    Which works. I just with there was something native to CF that could handle dates outside of local timezone rules.

  • E61 timezone bug!!!

    Hi, there seems to definitely be a bug in the E61 firmware 3.0633.09.04 in regard to the timezone for USA->Phoenix.
    How do I report this or find out if there is a patch?
    Basically, United States/Phoenix has GMT-0 rather than GMT-7. Previous firmwares did not have this problem.
    Help!!!!!!
    Dennis

    It's very hard to find it... http://europe.nokia.com/A4164022?url=http://nds1.nokia.com/phones/files/software/Nokia_E61_​WorldClockUpdate.SIS
    Cheers

  • Outlook Calendar Timezone bug

    I am having an issue with displaying the time on the calendar after the daylight saving apply to the Pacific Timezone.
    I have Outlook Version 14.0.7113.5005 (32-bit) installed on the Window 7 32 bit machine.
    I tried the Time Zone Daylight Saving Update Tool that Microsoft provided, but it doesn't seem like it works for me.
    Anyone have an idea on how to solve this issue?
    Thanks.

    Hi,
    First please make sure your Windows and Office are both fully patched.
    I also suggest you confirm that the time zone settings for your computer's system clock and your Outlook Calendar are the same.
    Regards,
    Melon Chen
    TechNet Community Support

  • Iphone Time/Timezone bug.

    I have an Iphone that is having some odd time bug. It appears to wind up 15-20 minutes behind, and when I toggle "Set Automatically" in Date & Time it will go five or so hours behind then correct itself to the proper time, then eventually wind up minutes behind again. The person is hesitant to restore their phone because they will lose some content. Any idea what could be causing the issue? The phone is a Iphone 5c with Ios 7.1.1.

    Is iPhone hacked?
    The time is sync with the cell tower, try a
    Reset: Hold down the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears. Note: You will not lose any data
    If no joy that person should do
    Restore from backup
    or
    Restore as new
    http://support.apple.com/kb/HT1414

  • Request fix for timezone related bugs

    To Adobe Lightroom employees...
    Even the new release of LR3 still has age old timezone bugs which are likely infuriating for anyone who shoots in more than a single timezone.
    Problem 1: LR ignores camera metadata relating to timezone.
    Solution 1: Include a time/date panel in the importer dialog. If camera metadata is present, use it to set defaults. Provide options for shifting both the time and the timezone (e.g. can shift 2010-01-01T01:05:06+01:00 to become 2010-01-01T01:02:03-02:00). This info can be stored in LR database and in exported XMP data.
    Problem 2: LR exports incorrect timezone data.
    Solution 2: Due to EXIF limitations this cannot be guaranteed correct. Provide an option to export EXIF date/time using a specified timezone (origination/computer/other).
    Other problems: File renaming issues relating to timezones, sorting in grid view, etc.
    Solutions: If every file has an assigned timezone, all these should become moot points, as information is held to get it right.
    The bottom line is that most timezone issue have been present since Lightroom was initially released, and numerous people are frustrated with having purchased a leading product with a glaring set of bugs which corrupt valuable metadata, and interrupt workflow. Providing fixes for these bugs and facilities for handling them sensibly and gracefully, along with default options to provide the current behaviors, allows for the best of both worlds. Date/time are key bits of metadata for any photo, and an inability to handle this properly in one of the leading brands of software is, quite frankly, inexcusable. New features keep being included, yet important basic functionality such as this gets left aside; please prioritize this for the next release to appease many long-suffering, paying customers.
    Stan

    I too wish that Lightroom would handle date/times with time zones and let users manipulate them.  LR 3 consistently ignores time zones; see this post for details:
    http://forums.adobe.com/message/2931846#2931846
    I think the root cause of this mess is that the EXIF standard, defined in 1998, doesn't support time zones (hard to believe that a standards committee would make such a basic mistake).  Even though Adobe's XMP standard requires the use of time zones, LR ignores them!

  • Mysql on macbook

    hello, i have a macbook running mac os x, version 10.6.1. I have apached setup and
    am running php as well. I recently downloaded and installed mysql and mysql gui tools.
    I tried to connect to mysql via mysql administrator and got the following error:
    connection error
    could not connect to mysql instance at localhost
    error can't connect to local mysql server through socket 'tmp/mysql.sock'(2) (code2002)
    I'm a developer and have picked up a mac to begin coding on the mac. I have a VAMP running and
    it works great; just want to figure out how to get mysql running on the mac.
    thanks

    HI,
    Im having a similar problem.
    However, here are some things I've discovered. If you go to the directory that you're pointing at, there's nothing there.
    If you've downloaded and installed the 5.1.x version from MySQL site, then you're probably having the same problem I'm having....PHP sees the 5.0.51 version but not the correct version that you've installed.
    Are you running the proper 64bit version or 32 ? It makes a difference. Im running 64 and I can't get PHP to connect.
    Further the MySQL admin is a piece of crap! Always has been on the mac. Get Navicat. You'll be happier. You can at least connect to your databases. PHP is a whole other story.
    Still another little detail is the date.timezone bug that's now present. Find this line in your PHP.INI file:
    ;date.timezone =
    and uncomment it. Then add your time zone location. http://php.net/manual/en/timezones.php
    Hope that helps....
    Miles

  • LiveView on Droid X, Text Messaging Doesnt Display

    Hi All,
       I got a LiveView last week and so far on my DroidX everything seems to work about as well as I expected, EXCEPT Text Messaging never displays on the LiveView.
    This was a major feature I hoped would work even if some of the other less important ones didnt.
    Does anyone have any ideas as to how to get Text Messages to display on a DroidX?
    Ive tried everything I can think of but nothing seems to make any difference.
    I really like the concept of the LiveView and would like to see it develop rapidly.
    Thank you.

    ISSUE RESOLVED!!
    EXPLANATION OF ISSUE (FOR SONYERICSSON TECHNICIANS TO FIX IT THE RIGHT WAY)
    The problem you are having is a common one for Droids on Verizon's CDMA network, as well as Rogers in Canada and Sprint PCS.  Its just another form of the SMS time offset issue that's been plaguing us all for years...
    for some stupid reason, the CDMA network timestamps all messages in GMT, rather than the local timezone
    This issue is annoying, and should have been fixed in the verizon distributions of android a long time ago, but it is compounded by a confusing programming choice made by Sony Ericsson:
    Inside the dex file of the apk, in "com/sonyericsson/exttras.liveview/LiveViewService$9.class" on line 31 (ignoring blank lines and comments), there is a test run on the timestamp... (the exact code is "if (l1 > l2)")...  THIS TEST FAILS ON ALL CDMA PHONES WITH THE TIMEZONE BUG
    I'm not sure why they were working it that way, but they should have simply tested to see if the message was newer than the last message received... they apparently did not.
    HOW TO MAKE IT WORK (WITHOUT MODIFYING THE APK FILE)
    install SMS Time Fix from the market, and set the offset method to "timezone".  This fixes the issue, as well as issues with message order in restored backups.

  • Bug In Java 5 Date/Calendar Timezone Implementation (possibly 6 also)

    Hey All,
    Really been scratching my head over a date issue I've observed for a while now in relation to TimeZone handling in java.
    It first manifested itself as strange behaviour in my Default TimeZone "Europe/Dublin" (ie. GMT with DST)
    e.g:
    System.setProperty("user.timezone", "Europe/Dublin");
    Date epoch=new Date(0);
    System.out.println("Epoch:"+epoch);
    yields:
    Epoch:Thu Jan 01 01:00:00 GMT 1970
    1AM (BUG???????)
    If I set the TZone above to GMT it outputs correctly as
    Epoch:Thu Jan 01 00:00:00 GMT 1970
    As there is no offset from GMT I can only think that DST is being handled incorrectly around the epoch. (even though it is not in DST on Jan 1st)
    So I wrote the following test using calendars to test my theory.
              System.setProperty("user.timezone", "UTC");
              Calendar test=Calendar.getInstance(); //will use the user.timezone
              Calendar test2=Calendar.getInstance(TimeZone.getTimeZone("Europe/Dublin"));
              for (int year=1965;(year<=1975);year++){
                   test.clear();test2.clear();
                   test.set(year, 0, 1, 0, 0, 0);
                   test2.set(year, 0, 1, 0, 0, 0);
                   System.out.println("UTC:"+ test.getTime()+ " --- EU/Dub:"+test2.getTime());
    Which yields the following interestingly inconsistent output (BUG?????)
    UTC:Fri Jan 01 00:00:00 UTC 1965 --- EU/Dub:Fri Jan 01 00:00:00 UTC 1965
    UTC:Sat Jan 01 00:00:00 UTC 1966 --- EU/Dub:Sat Jan 01 00:00:00 UTC 1966
    UTC:Sun Jan 01 00:00:00 UTC 1967 --- EU/Dub:Sun Jan 01 00:00:00 UTC 1967
    UTC:Mon Jan 01 00:00:00 UTC 1968 --- EU/Dub:Mon Jan 01 00:00:00 UTC 1968
    UTC:Wed Jan 01 00:00:00 UTC 1969 --- EU/Dub:Tue Dec 31 23:00:00 UTC 1968
    UTC:Thu Jan 01 00:00:00 UTC 1970 --- EU/Dub:Wed Dec 31 23:00:00 UTC 1969
    UTC:Fri Jan 01 00:00:00 UTC 1971 --- EU/Dub:Thu Dec 31 23:00:00 UTC 1970
    UTC:Sat Jan 01 00:00:00 UTC 1972 --- EU/Dub:Sat Jan 01 00:00:00 UTC 1972
    UTC:Mon Jan 01 00:00:00 UTC 1973 --- EU/Dub:Mon Jan 01 00:00:00 UTC 1973
    UTC:Tue Jan 01 00:00:00 UTC 1974 --- EU/Dub:Tue Jan 01 00:00:00 UTC 1974
    UTC:Wed Jan 01 00:00:00 UTC 1975 --- EU/Dub:Wed Jan 01 00:00:00 UTC 1975
    Strange - ehh? 1969->1971 all have issues with the Jan 1st date!!!!
    In fact theres issues for every day that DST is not in operation on these years... (BUG????)
    I'm part of a project that will be handling data from all Timezones and as such we have chosen
    to use UTC as our server time. We are now quite concerned what other bugs/strange behaviours
    lurk beneath the surface of the java implementation.
    Note we have tested various JDK's and they seem to be consistently inconsistent!
    If anyone can confrim this bug/issue or shed any light it would be most appreciated,
    G.

    miniman wrote:
    As there is no offset from GMT I can only think that DST is being handled incorrectly around the epoch. (even though it is not in DST on Jan 1st)Well, in the UK, DST was in effect on 1970 Jan 01. I wouldn't be surprised to find that the same applied in Ireland.

  • Aperture ... Bug .... timezones and smart albums

    Hello everyone,
    i've just jumped into the mac world a week ago, just bought my first macbook ! Yeah !
    I decided to give Aperture a try, and given i've played with it now for 2 days, if this bug I found is really there, NO WAY am I going to pay for such software !
    I've been using Picasa on PC for the past couple years now.
    Its handling my photo library extremely well: over 50gb of photos, 10 years worth of photos.
    So after looking at all the Aperture videos on the apple site, I decided to give it a try to replace my picasa, since there is no picasa for my new mac.
    The bug I found (and I'm a newbie !, 2 days of playing, struggling to import my pictures, and bam ... bug .... hummmm).
    I tried importing only 1 folder in my library.
    I'm french and this summer, went to USA for holiday. Western deserts and all.
    So, I took my folder:
    2008 08 09 - USA Grand West
    And tried importing it.
    It contains around 100 photos of the 1st 3 days of the trip.
    My camera was set to French time, so at import I appreciated the "Change time thingy" and set it to Los Angeles time.
    Did the import in a new project.
    Great.
    All pictures in the project. Exif Date updated to los angeles time. GREAT !
    Now.
    I want to have them show up on a day to day basis.
    So, I created smart albums giving the date I wanted.
    August 9 2008, August 10 2008 and August 11 2008.
    It DOES NOT WORK ! BUGGGGGGGG
    photos taken on the 3rd day, having correct EXIF date metadata, show 11/08/2008 for the date (correct), however they are not shown in the August 11 2008 album !
    They are shown in the August 12 2008 album !
    Reason !
    The smart album is using the wrond date. The French one.
    Since there is 11 hours difference.
    Some late August 11 (Los Angeles time) pictures are pushed to August 12 (early morning French time).
    Am I the only one with this bug ?
    The only fix I found for now that works, is adding 3 rules to the smart albums:
    - exif: day of the month = 11
    - exif: month of the yar = 08
    - exif: year = 2008
    That works.
    However there is NO WAY, i'm setting up 50gb worth of smart albums having to apply 3 specific rules to compensate for a bugged out calendar rule that does not work.
    Any ideas ? fixes ?
    Thanks
    Regards
    Tim

    Hum, i'm not sure I understand what is going on, or what you are describing.
    you say: "... Aperture is correct in it's assertion the image was taken on 12th"
    I dont understand.
    When i've done the import, and look at that pictures metadata, the date/time is corrected. It shows up as 15:42 20080811 (youre writting).
    So if the metadata is correct, I really dont understand how the computers time and timezone has any effect on the smart albums ... could you explain ?
    Unless what you are suggesting, is that the smart album date is applied to the computers time zone, and thus when searching for the files, it automatically does a conversion of the time of the picture to fit the computers timezone => thus my 15:42 20080811 set to Los Angeles time zone, is researched using a French timezone and thus found on 00:42 20080812 ?
    Wow, if so, this would be a stretch !
    And if this is the answer, I do not understand the "feature" to import using a different time zone, and not be able to search according to it ?
    There is effectively no point?
    In respect to the workaround you describe. Its effectively what I did, I sorted using 3 criterias: exif day of the month = 11, month of the year = 08, year = 2008. And for some reason that works !
    Would there be another workaround? Instead of using the TimeZone panel, import them untouched, and doing a batch Time change on the pictures once imported and leaving them at the same Paris timezone, but compensating for 9 hours, effectively, bringing them to 15:42 Paris time, instead of Los Angeles time ?
    If my memory is correct when having played with this, the batch time modification, did not compensate the days: Effectively, clicking 9 times on the down arrow when showing 00:42 12th did not change the 12th into an 11th ...

  • Is j2sdk-1_4_2_18-windows-amd64.exe rel with a FIX on Portal/SPNEGO Bug

    I am using j2sdk-1_4_2_17-windows-amd64.exe for my EP7.0 SP14.
    My SPNEGO is completed and the authentication is working fine. But the Portal Logon Page is coming when I am using the URL : http://PortalServername.Domain name/irj/portal.
    Found a note : 1057474 which says all JDK version 1.4.2_14 to 1.4.2_17 is having a Kerberos bug.
    My question here is should I install JDK 1.4.2_18 amd 64 ... and give a try or should downgrade back to 13 .... Will this impact my EP 7.0 SP 14 or any other application.
    Points will be awarded for any help.

    Got the Solution for the SPNEGO Bug Fixing :
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6572805
    For any JDK Version simply add :
    isInitiator = false in your Visual Admin
    -->Security Provider -->com.sun.security.gss.accept -->Krb5LoginModule
    Parameter isInitiator and Value false. Save it and take a bounce of J2EE.
    Njoy.

  • Bug report - OOB site column ArticleStartDate is crawled according to GMT0 not user/server timezone

    This issue can be reproduced easily on any SP2013 farm (on-premise) and I heard Sharepoint online do not have this problem.
    Issue: Site column "Article Date" with fieldname "ArticleStartDate" is crawled as GMT 0 regardless what timezone your web application, site setting, user setting and OS are set. Also when you submit a search you need to use GMT 0
    otherwise you will get wrong result. I believe it is bug because other datetime columns like "Modified" have handled timezone issue very well.
    To reproduce: On a SP2013 farm (on-premise), check your timezone settings (in my environment it is GMT+8). Then create a site collection and enable its Publishing Infrastructure feature. Then you will see some site columns are setup including "Article
    Date" (field name "ArticleStartDate"). Now create a custom content type and add some columns including "Article Date" to it. Create some sample items using the custom content type and remember fill in the value for "Article Date".
    By default it should allow you pick a "Date" only. After save the change you should see "Article Date" is saved like "2014-06-18 00:00:00" if check with powershell.
    After create some sample items start a full crawl. You will see find two crawled property "ows_q_DATE_ArticleStartDate" and "ows_ArticleStartDate" appear in Search Service Application -> Search Schema. There are some existing managed
    properties mapping to those crawled properties like "ArticleStartDateOWSDATE" (which is TEXT datatype).
    Here you can create some new managed property or use existing. Apply search using those properties to test. In my lab, I created "NewsArticleDate" as managed property and mapping to ows_ArticleStartDate. Then I create a blank
    page and add a "Search result" and "refinement panel" webpart and start some search. In the refinement panel added in the managed properties setup in previous steps. In the querystring I typed in something like /search.aspx?k=newsarticledate=YYYY/MM/dd
    It is what I see:
    1. As you can see in the refinement panel, because I am at GMT+8 and crawled index at GMT 0, the sample data "2014-06-18 00:00:00" will become "2014-06-17 16:00:00".
    2. Hence, in order to search out "2014-06-18 00:00:00"  item I have to input "2014-06-17" in search query! (in SP2013 the time part are ignored)
    3. By using the powershell provided by Ivan Josipovic (http://gallery.technet.microsoft.com/office/Get-Crawled-Property-names-9e8fc5e0), I can see the items
    ows_ArticleStartDate is "2014-06-18 00:00:00".
    I hope it is actually not a bug. Please let me know if my setting is wrong. Thank you!

    Hi Mark,
    According to your description, my understanding is that the Article Date column displayed with the value based on GMT0 in the Refinement web part.
    Microsoft SharePoint stores date and time values in Coordinated Universal Time (UTC, but also named GMT or Zulu) format, and almost all date and time values that are returned by members of the object model are in UTC format. So the value
    of the Article Date column stores the date and time in UTC format in the database, and the search indexes the UTC value of the Article Date column after crawling the database so that it displays the UTC value in Refinement web part.
    The list column values displayed in the lists that are obtained through the indexer for the SPListItem class are already formatted in the local time for the site so if you’re working on current context list item and fetch a datetime field
    like so SPContext.Current.ListItem["Your-DateTime-Field"] you’ll retrieve a DateTime object according the specified time zone in the regional settings.
    More references:
    http://francoisverbeeck.wordpress.com/2012/05/24/sharepoint-tip-of-the-day-be-careful-when-wor/
    Thanks,
    Victoria
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Victoria Xia
    TechNet Community Support

  • Timezone and Birthday bug in Address Book

    Hello,
    I just found a bug related to the Address Book, birthday fields, and timezones in 10.4.6. I had many contacts with filled birthdays. I had my system timezone set to Brazil (GMT-3), but now I moved to Japan, and set the timezone to Japan (GMT+9). When I opened Address Book after that, all birthday fields are showing one day late (for instance, if the birthday was on 1978/02/24, it will now show as 1978/02/25). Consequently, the birthdays in iCal are also showing late.
    I guess this is an internal representation bug, in that the birthdays are stored with the timezone, and when I changed the system timezone the correct date started being recalculated. But as a "timeless" event, birthdays should only display at the set date, without any conversion.
    PowerBook G4 12 Rev. A/iPod with Video 30GB   Mac OS X (10.4.3)  

    You seem to be right. Here is what I noticed with further experimentation.
    The time difference between Brazil and Japan is 12 hours, that is, in any given day, when it reaches noon (12:00) in Japan, the day is just starting (00:00) in Brazil, and when it reaches noon (12:00) in Brazil, that same day is ending in Japan (23:59). So, during the period 12:00-23:59 in Japan (and 00:00-11:59 in Brazil), both places are under the same day.
    Here is the interesting bit: birthday events added in Brazil during this period (before noon) show with the correct date, when I set the timezone do Japan. Birthday events added in Japan in the afternoon also show the correct date when I set the timezone back to Brazil's. So Address Book is using the field edit date, somehow.
    For now, I have manually reedited all the birthday fields during this "same day" period, and birthdays are showing correctly no matter if I am in Brazil or Japan, but that is definitely a hack.

  • IPhone Calender-timezone serious bug

    Hi,
    last week i made a trip to Istanbul. My iPhone changes automatically to local time in Istanbul und changes also the timezone for the calendar entrys. On Friday i went back to Vienna, and also my iPhone switches automatically to the local time there (-1 hour). But NOT the calendar-timezone.
    So, the problem is now, if I want to be remembered, the iPhone remberes me on hour to early.
    I can switch the timezone in the iPhone-Settings to "Vienna" or I turn off the timezone-support completely. Strangly then ALL my calendar-entrys appear now on hour earlyer.
    I'm really annoyed about this bug. Means, if I want to proceed with the normal functions I have now to re-write my whole entrys for the next half year???
    Also I have the problem with duplicate calendar-Lists.
    Will some software-update work for this bugs?
    Regards

    I've come onto this forum for the first time because of the same issue! Except I went to India, so the time difference is 13 1/2 hours, so my reminders are a full day off. Does anyone have any suggestions?

  • ConvertDateTime: caching TimeZone: possible JSF bug?

    Hi all,
    I'm outputing a date field utilizing the timezone attribute of the convertDateTime tag. When I change the viewing timezone, the convertDateTime tag seems to be caching the old timezone value.
    Is anyone else encountering this issue? Is it a Bug? Is there a work around?
    Thanks all,
    Here is some test code I wrote to expose the bug...
    public class TimeZoneTest {
        private static final Log LOGGER = LogFactory.getLog(TimeZoneTest.class);
        private TimeZone timeZone = TimeZone.getTimeZone("GMT");
        private Date currentTime = new Date();
        private SelectItem[] availableTimeZones;
        public TimeZone getTimeZone() {
            return timeZone;
        public void setTimeZone(String timeZone) {
            this.timeZone = TimeZone.getTimeZone(timeZone);
        public Date getCurrentTime() {
            return currentTime;
        public SelectItem[] getAvailableTimeZones() {
            if (null == availableTimeZones) {
                availableTimeZones = new SelectItem[3];
                availableTimeZones[0] = new SelectItem("GMT","GMT");
                availableTimeZones[1] = new SelectItem("PST","PST");
                availableTimeZones[2] = new SelectItem("EST","EST");
            return availableTimeZones;
    }The JSP:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <%@ page contentType="text/html;charset=UTF-8" language="java" %>
    <%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
    <%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
    <META HTTP-EQUIV="Pragma" CONTENT="no-cache"/>
    <META HTTP-EQUIV="Expires" CONTENT="-1"/>
    <f:view>
        <html xmlns="http://www.w3.org/1999/xhtml">
            <body>
                <h:form>
                    <h:panelGrid columns="2">
                        <h:outputText value="TimeZone:"/>
                        <h:outputText value="#{timeZoneTest.timeZone.ID}"/>
                        <h:outputText value="Current Time:"/>
                        <h:outputText value="#{timeZoneTest.currentTime}">
                            <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss z" timeZone="#{timeZoneTest.timeZone}"/>
                        </h:outputText>
                        <h:outputText value="Change Time Zone:"/>
                        <h:selectOneMenu value="#{timeZoneTest.timeZone.ID}"
                                         onchange="submit()">
                            <f:selectItems value="#{timeZoneTest.availableTimeZones}"/>
                        </h:selectOneMenu>
                    </h:panelGrid>
                </h:form>
            </body>
        </html>
    </f:view>

    Thanks for the reply.
    It appears the "F" tags are read in once per session. In my real testcase, if I start a new session the dates show in the correct timezone. So I believe this means that any evaluated value bindings for the "F" tags would be stored at the session scope.
    IMO - this is a major design flaw. Why allow for dynamic value binding expressions on a component that isn't fully evaluated when the tree is rendered?
    The only way around this seems to be a custom tag.
    So here is my crude outputDate custom tag - I hope this helps someone.
    Disclaimer: I only tested the three attributes I made: not sure if the component is as fully functional as say a h:outputText tag.
    Cheers,
    Jason V.
    The Tag:
    public class OutputDateTag extends UIComponentTag {
        private static final Log LOGGER = LogFactory.getLog(OutputDateTag.class);
        private String pattern;
        private String timeZone;
        private String value;
        private static final String TIME_ZONE_ATTRIBUTE = "timeZone";
        private static final String PATTERN_ATTRIBUTE = "pattern";
        private static final String VALUE_ATTRIBUTE = "value";
        public void setPattern(String pattern) {
            this.pattern = pattern;
        public void setTimeZone(String timeZone) {
            this.timeZone = timeZone;
        public void setValue(String value) {
            this.value = value;
        public String getRendererType() {
            return null;
        public String getComponentType() {
            return "com.mycompany.presentation.components.UIOutputDate";
         * Sets the 3 expected attributes:
         * <pre>
         * value: should evaluate to a java.util.Date object.
         * timeZone: should evaluate to a java.util.TimeZone object.
         * pattern: should evaluate to a String and be a compatiable form for a SimpleDateFormat object.
         * </pre>
         * {@inheritDoc}
         * @param component {@link UIComponent} whose properties are to be overridden
        @SuppressWarnings({"unchecked"})
        protected void setProperties(UIComponent component) {
            super.setProperties(component);
            FacesContext context = FacesContext.getCurrentInstance();
            Application application = context.getApplication();
            //pattern
            Map attributes = component.getAttributes();
            if (isValueReference(pattern)) {
                ValueBinding patternValueBinding = application.createValueBinding(pattern);
                component.setValueBinding(PATTERN_ATTRIBUTE, patternValueBinding);
            } else {
                attributes.put(PATTERN_ATTRIBUTE, pattern);
            //time zone
            if (isValueReference(timeZone)) {
                ValueBinding timeZoneValueBinding = application.createValueBinding(timeZone);
                component.setValueBinding(TIME_ZONE_ATTRIBUTE, timeZoneValueBinding);
            } else {
                attributes.put(TIME_ZONE_ATTRIBUTE, timeZone);
            //value
            if (isValueReference(value)) {
                ValueBinding valueBinding = application.createValueBinding(value);
                component.setValueBinding(VALUE_ATTRIBUTE, valueBinding);
            } else {
                attributes.put(VALUE_ATTRIBUTE, value);
            LOGGER.debug("pattern = " + pattern);
            LOGGER.debug("timeZone = " + timeZone);
            LOGGER.debug("value = " + value);
         * <p>Release any resources allocated during the execution of this
         * tag handler.</p>
        public void release() {
            super.release();
            value = null;
            timeZone = null;
            pattern = null;
    }The TagLib:
        <tag>
            <name>outputDate</name>
            <tagclass>com.prenet.presentation.tags.OutputDateTag</tagclass>
            <bodycontent>empty</bodycontent>
            <attribute>
                <name>value</name>
                <required>true</required>
                <rtexprvalue>false</rtexprvalue>
            </attribute>
            <attribute>
                <name>pattern</name>
                <required>true</required>
                <rtexprvalue>false</rtexprvalue>
            </attribute>
            <attribute>
                <name>timeZone</name>
                <required>true</required>
                <rtexprvalue>false</rtexprvalue>
            </attribute>
            <attribute>
                <name>binding</name>
            </attribute>
            <attribute>
                <name>id</name>
            </attribute>
            <attribute>
                <name>rendered</name>
            </attribute>
        </tag>The Component:
    public class UIOutputDate extends UIOutput {
        private static final Log LOGGER = LogFactory.getLog(UIOutputDate.class);
        private static final String TIME_ZONE_ATTRIBUTE = "timeZone";
        private static final String PATTERN_ATTRIBUTE = "pattern";
        private static final String VALUE_ATTRIBUTE = "value";
        public UIOutputDate() {
            //we render ourself... thanks.
            setRendererType(null);
         * Uses the timeZone and pattern attributes to pass to a  SimpleDateFormat object to get a String
         * representation of the Date value.
         * @throws NullPointerException {@inheritDoc}
        public void encodeBegin(FacesContext context) throws IOException {
            ResponseWriter writer = context.getResponseWriter();
            Locale locale = context.getViewRoot().getLocale();
            Map attributes = getAttributes();
            Date value = (Date) getValue();
            TimeZone toTimeZone = (TimeZone) attributes.get(TIME_ZONE_ATTRIBUTE);
            String pattern = (String) attributes.get(PATTERN_ATTRIBUTE);
            DateFormat format = new SimpleDateFormat(pattern, locale);
            format.setTimeZone(toTimeZone);
            String dateString = format.format(value);
            writer.writeText(dateString, VALUE_ATTRIBUTE);
    }The Test JSP (note: that there are some fixes to my original post)
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <%@ page contentType="text/html;charset=UTF-8" language="java" %>
    <%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
    <%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
    <%@ taglib prefix="p" uri="http://www.mycompany.com/jsfTaglib" %>
    <META HTTP-EQUIV="Pragma" CONTENT="no-cache"/>
    <META HTTP-EQUIV="Expires" CONTENT="-1"/>
    <f:view>
        <html xmlns="http://www.w3.org/1999/xhtml">
            <body>
                <h:form>
                    <h:panelGrid columns="2">
                        <h:outputText value="TimeZone:"/>
                        <h:outputText value="#{timeZoneTest.timeZoneId}"/>
                        <h:outputText value="Current Time (Standard JSF):"/>
                        <h:outputText value="#{timeZoneTest.currentTime}">
                            <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss z" timeZone="#{timeZoneTest.timeZone}"/>
                        </h:outputText>
                        <h:outputText value="Current Time (Custom TAG):"/>
                        <p:outputDate value="#{timeZoneTest.currentTime}" pattern="MM/dd/yyyy HH:mm:ss z" timeZone="#{timeZoneTest.timeZone}"/>
                        <h:outputText value="Change Time Zone:"/>
                        <h:selectOneMenu value="#{timeZoneTest.timeZoneId}" onchange="submit()">
                            <f:selectItems value="#{timeZoneTest.availableTimeZones}"/>
                        </h:selectOneMenu>
                    </h:panelGrid>
                </h:form>
            </body>
        </html>
    </f:view>The Testing Backing Bean:
    public class TimeZoneTestVC {
        private static final Log LOGGER = LogFactory.getLog(TimeZoneTestVC.class);
        private String timeZoneId = "UTC";
        private SelectItem[] availableTimeZones;
        public TimeZone getTimeZone() {
            TimeZone timeZoneByName = TimeZone.getTimeZone(timeZoneId);
            return timeZoneByName;
        public String getTimeZoneId() {
            return timeZoneId;
        public void setTimeZoneId(String timeZoneId) {
            this.timeZoneId = timeZoneId;
        public Date getCurrentTime() {
            return new Date();
        public SelectItem[] getAvailableTimeZones() {
            if (null == availableTimeZones) {
                String[] availableIDs = TimeZone.getAvailableIDs();
                Arrays.sort(availableIDs);
                availableTimeZones = new SelectItem[availableIDs.length];
                int i = 0;
                for (String zoneId : availableIDs) {
                    availableTimeZones[i] = new SelectItem(zoneId, zoneId);
                    i++;
            return availableTimeZones;
    }

Maybe you are looking for

  • Itunes Unable to Load Dataclass info from Sync Services and unable to back up.

    Community please help. I am running Windowns 7 and all of a sudden i cannot sync either one of my two iphones or my ipad. The first error i get states: "iTunes was unable to load data class information from Sync Services. Reconnect or try again later

  • HT1420 how do I see what devices are authorized

    iTunes is telling me that I have authorized 5 computers already and to my knowledge I've only authorized 3.  Is there a way to see what devices are authorized under my apple ID??  Thanks!

  • Why won't my applications sync onto my iPhone?

    The applications I buy from the apps store on my computer won't sync onto my iPhone when I connect it. It won't let me check the sync box or anything on the apps page of my iTunes. Anyone know how to fix it?

  • Can't configure webmail

    Hi everyone... after the recent upgrade to 10.4.3., it seems that webmail needs to be reconfigured again. When I try to edit the configuration file in Terminal, the command can't be found. What are we doing wrong? Is there an easier way to configure

  • Distributed Copy Editor - openStory failed

    Hi there Not sure if this is in the right place but here it goes. Today I found Distributed Copy Editor 1.0 SDK and it looks excactly like what I need. I've followed all the steps in the getting-started-guide document to set up the server, client and