Time is one hour off (tz issue)

Using Calendar, Date, or System.currentTimeMillis(), the time is one hour early. I am in America/New_York. The root of the problem seems to be that it's not using DST. Printing out the current Calendar says:
java.util.GregorianCalendar[time=1241705420169,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id="GMT-05:00",offset=-18000000,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2009,MONTH=4,WEEK_OF_YEAR=19,WEEK_OF_MONTH=2,DAY_OF_MONTH=7,DAY_OF_YEAR=127,DAY_OF_WEEK=5,DAY_OF_WEEK_IN_MONTH=1,AM_PM=0,HOUR=9,HOUR_OF_DAY=9,MINUTE=10,SECOND=20,MILLISECOND=169,ZONE_OFFSET=-18000000,DST_OFFSET=0] tz=sun.util.calendar.ZoneInfo[id="GMT-05:00",offset=-18000000,dstSavings=0,useDaylight=false,transitions=0,lastRule=null]
It's currently 10:10am (2:00am GMT), and the above says it's 9:10am, but it also says "useDaylight=false".
Being a good hacker, I found the tz updater program, and ran it, and it failed every test.
root@dkramer-laptop:/dload/tzupdater-1.3.12-2009a# java -jar tzupdater.jar -u -v
java.home: /usr/lib/jvm/java-6-openjdk/jre
java.vendor: Sun Microsystems Inc.
java.version: 1.6.0_0
JRE time zone data version: tzdata2008e
Embedded time zone data version: tzdata2009a
Extracting files... done.
Renaming directories... done.
Validating the new time zone data... /data/tzdata2009a.test:509: time zone not found: US/Pacific-New
/data/tzdata2009a.test:510: time zone not found: US/Pacific-New
/data/tzdata2009a.test:511: time zone not found: US/Pacific-New
/data/tzdata2009a.test:4089: test failed: Asia/Gaza
/data/tzdata2009a.test:4090: test failed: Asia/Gaza
/data/tzdata2009a.test:4093: test failed: Asia/Gaza
failed.
Validation tests failed.\
Restoring the saved time zone data... done.
Being a good hacker again, I figured the raw data must be in the JAR file, and I found it there, and replaced the zi directory's content with the content of the zip file. I still have the same problem, though. And I did it in every JVM I have installed, so it can't be pointing at the wrong one.
Sooo...
1) Why is the updater failing?
2) Is there a way to beat Java into submission to use DST?
Thanks.

dj_segfault wrote:
I would be very surprised to find out that time zones were tacked on on to UNIX as an afterthought, given how it was meant to be used in a remote and distributed way.
According to [this article on Wikipedia|http://en.wikipedia.org/wiki/Zoneinfo] , the zoneinfo system dates back to 1986 or so. [According to Sun (nee Oracle)|http://www.java.com/en/javahistory/timeline.jsp] , Java started several years later.
Origins of unix either as 1969
[http://www.bell-labs.com/history/unix/acronyms.html]
or 1970
[http://www.bell-labs.com/history/unix/almost.html]
Thus one would suppose that means that more than 16 years passed between the origins and when the zoneinfo was added.
Or perhaps you are suggesting that unix didn't exist until 1986?
In comparison, java has only been around 13 years.
I understand that Java needs a system-independent way of determining the time zone info, but this isn't a "close enough" kinda situation. Picking the first one it sees is hardly appropriate, especially given [Sun has a whole page on Java and Time Zones|http://java.sun.com/javase/timezones/] and doesn't document this "feature". And now that we have laptops, it's especially important for the user to be able to control what time zone their software thinks they are in.
You missed my point. It isn't a matter of being OS independent, but rather that the situation is in fact muddled on every OS, thus one must make a best guess effort. I have seen experts in unix, groups of them, befuddled by where a particular unix application was getting its timezone info from.

Similar Messages

  • Capture time is one  hour off

    My "capture time" as displayed in the right metadata panel is one hour earlier than it actually happened. I date my digital camera photos by date time and Lightroom displays the capture time an hour earlier than the file date time or the capture date time displayed in other tools, for example, Bridge.
    I noticed this from the beginning but it didn't sink in that it's that way for photos from digital cameras as well as these scans I'm trying to get the date correct on.
    Anyone have any idea about what's going on?

    LR is using the EXIF 'Date Time Original' field to sort by Capture Time .
    LR automatically displays Date Time Original minus 1 hour from any Date within a period of Daylight Saving Time.
    It does not change the EXIF metadata within the original file.
    However (and here is the catch...), if you use the Edit Capture Time function it changes the capture time NOT in relation to the Date Time Original value but to the LR (DTO-1) value.
    Thats OK you might think but unlike other metadata changes you make in LR this one gets written straight back to the original image file!
    But LR has a solution - 'Revert Capture Time to Original' - or does it...?
    After Reverting the Capture Time to Original, I discovered that the EXIF Date Time Original value in the image file was now shifted by minus 1 hour.
    Scary bit is I tried this first with JPG and DNG files but then with a Canon CR2 RAW file and got the same result. Just to be certain I looked at the file with a Hex editor and sure enough LR had changed the Date Time Original value by minus 1 hour in the CR2 file without warning.
    I don't know about the rest of you but I do not like this 'feature' at all!!!

  • Has there been an update or fix to the digital signature time zone off set being one hour off?

    Has there been an update or fix to the digital signature time zone off set being one hour off? I have seen that in the forum that this was identified as a bug back in June 2012. Any updates on this as it is still occurring in my version of Acrobat X with all updates applied. Thanks.

    Windows 7
    Sent from my BlackBerry 10 smartphone.

  • Calendar timeline one hour off

    In iOS 5 on an iPad 2, using calendar after converting to Eastern Standard Time using the Week View, the Timeline is one hour off (iCal didn't register the time change). When the time is 3:00 EST, the Timeline registers 4:00 pm EST.

    I had the same issue - not with Yahoo but Apple's own iCal and MobileMe.
    This worked for me:
    Go to iPhone Settings>Mail,Contacts,Calendars>Calendars>Time Zone Support
    Change Time Zone Support selector to "OFF" then back to "ON".
    Exit Settings
    NB: NOT Settings>General>Date & Time
    My Time Zone Support selector was "on", however Time Zone showed Etc/GMT -4
    When I selected Time Zone Support to "off" and then back to "on", Time Zone changed to show "New York" (my local area). Calendar events then displayed the same times as iCal/MobileMe.
    Rob

  • Ical appts. w/alerts are one hour off on iphone - how to fix?

    when I create an appointment in ical, it syncs fine with iphone, but the alert (and the appointment) are set for one hour later than what they are set for in ical. The timezone on both is accurate...Any ideas?

    Thx Bernard,
    You are very helpful
    When you went through the steps, were any of the settings different to those that I suggested?
    ......Yes, Time zone was uncheck in iCal and MM
    I don't think you mentioned importing previously. Where are the events originally created?
    .....I have a large spreadsheet of college athletic games that we keep in Excel and I import to iCal, they are ALWAYS one hour off after imported to iCal. Long before iPhone and MM too!
    I don't see that MobileMe is especially different to dotmac - except that you now have explicit control over the time zone of the calendar (whereas it used to be set to the one from which you originally published).
    ...Honestly the TZ Support is a HUGE pain and causes Much more trouble for all than anything it is suppose to help with..., been that way ever since iCal came out...
    One hour time differences often crop-up on a phone and are usually to do with daylight savings issues, but you don't mention a phone in your set-up so I am assuming this is not the case.
    ...again this one hour problem, has been an issue for me long before the iPhone and MM...
    I have to say that I don't have issues with my calendars and I have these synced across different systems and devices, so for me it really is a non-issue. (I should also say that I travel frequently and don't have problems with events in multiple time zones either.)
    ...glad it works for you, but it appears this is an issue for many. I used Now Up-To-Date for 10+ years and NEVER had trouble with import/export/sync...
    One thing I neglected to ask you is whether you do need to have time zone support - i.e. do you travel with any of the macs to which you sync or do you get invitations that originate in different time zones?
    ...I have no need for TZ Support even if I were and astronaut
    It would also be enormously helpful if you would provide data on what version of OS X and iCal you are using.
    ....I am on 10.5.5 and iCal 3.0.5
    Thx Much

  • Created tickets have a time of one hour ahead

    hi Experts,
    When tickets are being created on CRM by the NA Help desk  for UK customers,they are being created with a time of one hour ahead of the UK,
    It should be UK times.

    Hi Arden,
    users are set with GMT UK Timezone (greenwich UK with DST and  diffrence from UTC:  +/-0= UTC/GMT).
    users from North America Help Desk are creating tickets for the UK customers.
    when ever  tickets are created by  users of North America Help Desk, tickets are being created with a time of one hour ahead of the UK.
    Thank you.

  • Data one hour off in VI Logger and can't use navigation bars

    I believe after Daylight savings time in October my data appeared one hour behind in the Historical Data view in VI Logger. This would not be so big of a problem, but when I go to use the navigation tools to skip through the data or zoom in and zoom out, they do not work and the screen is always taken back to the original time (where there is no data because it is one hour behind.) My data is sampled at 50,000 samples/sec for about 1 minute, so it takes forever to scroll through the data at this sampling rate.
    I tried re-setting the time in my Window's system, but this did not help.
    Please help!!!

    Hi,
    There is a KB regarding this issue:
    KB 330J3S0U: Why Do My VI Logger Timestamps Seem To Be Off By An Hour?
    I would actually recommend referring to the related link on the bottom referring to Citadel Handling Daylight Savings Time. To workaround the Daylight Savings Time, 2 queries are made -- one prior to Daylight Savings Time and one after. Then the two queries are merged to get the entire range of data.
    Hope this helps.
    Kileen

  • Synching Treo 600 with I Cal alters meeting time by one hour?

    When preforming a synch with I CAL, all meeting times, Flight times etc were moved back one hour! Having now manually corrected the Schedule on the TREO what can I do to prevent this from recurring the next time I synch with Ical? Can I make the Treo Schedule override the now incorrect times on ICAL?

    Hi,
    Time zone issues have always been a pain in the you know what.
    Here is what the guys at Mark/Space gave me a long time ago. Maybe it will work with your situation.
    Ho Boy do I hate those 1 hour off time shift (ST-DT) issues, they are my worst nightmare. Because it is always a case by case solution, never got a single solution to work twice.
    So I will have to give you my check list, so you can go throuth it. The big picture is, making some backups, reset the pram on the Mac. Do the check list, finally do an overwrite of the handheld with the desktop data.
    Here we go.
    Do some backups first by following those simple steps
    1. Go to Address Book, click on 'File' menu and choose 'Back up Address Book'. Go to iCal, click on 'File' menu and choose 'Back up database'.
    2. Go to Missing Sync and double click on the Backup Conduit and set it to backup all databases. Then run the sync with just that Backup conduit selected, disable all other conduits.
    3. Go to: /Users/<user name>/Documents/Palm/Users/<hotsync name>/ now hold the 'ctrl' key and click on the /Backups/ folder. Choose the option to 'Create Archive of "Backups"'. This is to safeguard your backed up data in case anything goes wrong.
    Reset PRAM
    Shut down your computer, as soon as you start your computer press and hold command-option-P-R keys simultaneously until you hear the chime start up sound 3 times. Then let go of the keys.
    Support Reps and Engineers have met over this issue of Time Zones. There are some grey zones that still need to be addressed, either by us, Apple's iCal team or Palm.
    Here is a list of items that you need to verify or correct.
    1) Launch iCal, in the iCal menu go to Preferences, in the toolbar, click "Advanced", make sure that "Turn on time zone support" is unchecked.
    2) On your device, launch you calendar, menu Preferences, uncheck "New events use time zones".
    3) Check for new firmware updates available for your device. http://www.palm.com/us/support/downloads/
    4) Verify your location and time. (Ex: if your location is not listed in the selections you can add it).
    To add your location, tap location, go to "edit list", in the new window tap "add", you will see a list of Cities, go down the list to "Your Location" and add it to the your list.
    5) On your Mac, in the System Preferences, open the Date & Time pane, check your "Time Zone". Make sure that it is the same as your Treo.
    6) On your device, tap on the TimeCopy application use the drop-down menu to select Option and then Preference, you can modify to "Update" at Local time only.
    7) If you are using third-party Calendar applications (such as DateBK 5, Agendus etc.) consult your user documentation or contact the appropriate technical support representative.
    Go to iCal, click on 'File' menu and choose 'Back up database'. Modify the name of the backup so that it won't overwrite the one you did earlier.
    I suggest that you 'Reset Sync History' using the iSync preferences option. The first sync will likely be slower.
    1) Launch iSync
    2) Click on the iSync menu
    3) Choose Preferences (make sure the "Enable syncing on this computer" is checked)
    4) Click the 'Reset Sync History' button. Read and follow the onscreen directions.
    5) This may launch iCal. Also the status of the reset is showing in the iSync display. When the reset is complete quit both iSync and iCal.
    Launch Missing Sync and enable the Mark/Space Contacts, Events and Tasks conduits and set them to Desktop overwrite Handheld. Disable all other conduits.
    Then sync, when you do, you will get a dialog box with an orange iSync icon on it. Check the box to erase the device, then click the 'Allow' button. It will overwrite your device. You will get one for events, one for tasks, and one for contacts. The next time you sync .mac or other devices that sync with iSync like an iPod, you will get these same dialog boxes for their databases and you should check the box and click 'Allow' in those cases as well.
    Good luck...

  • I-Cal -- Appointments one hour off

    i-cal on i-phone is advancing all of my scheduled appointments by one hour. The i-cal on my i-mac has the correct appointment time, but the i-phone puts all of my appointments one hour ahead of their scheduled time. I missed two events today until I figured out what was happening.

    On your iphone go to settings -> general -> date and time.
    Make sure that the date, time and time zone is set correctly.
    If so, try turning time zone support off, and correct date and time settings.
    Go back to the home screen.
    Power the iphone off and back on.
    Check to see if the time for events is still an hour off.
    Hope this helps.

  • Domain Controller resets time ahead one hour on reboot

    I have a Windows 2003 R2 domain controller that is running on a Windows 2012 Hyper-V cluster. Time sync between the host and guest are disabled. The last two times the Domain Controller has been rebooted, time has jumped ahead one hour on the Domain Controller
    which is also our NTP server for the company. Our DC's have been virtualized for 5-6 years, first on VMware, then on hyper-v 2008 r2 now on 2012.
    I have verified that hosts and guests are configured for the correct time zone and the DST is enabled. The first incident occurred the weekend after the time change, so I thought maybe their was some DST issue.
    Any thought on why it would jump ahead exactly one hour after reboot?

    Might need the latest cumulative time zone updates.
    http://support.microsoft.com/kb/2863058
    http://blogs.technet.com/b/dst2007/archive/2013/08/13/august-2013-dst-cumulative-update-for-windows-operating-systems.aspx
    http://support.microsoft.com/kb/2890882
    You can also compare the setting here.
    http://support.microsoft.com/kb/914387
    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows]
    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

  • When syncing time is one hour different

    When I put an event into iCal and then sync it into my iPhone it comes up one hour earlier on the iPhone. Both my computer and iPhone are showing the same time and time zones so why is it syncing differently?

    Is the Set automatically on or off, should be off. that to is in settings, general, date&time.
    Message was edited by: Goshia

  • Time is one hour behind

    I am trying to get the time.value of
    a specified time
    the specified time is in format hh:mm;ss
    When it outputs the result the hour is one hour backward
    for e.g.
    import java.sql.*;
    System.out.println(""+Time.valueOf("03:00:00").getTime());
    It prints
    7200000
    System.out.println(""+Time.valueOf("04:00:00").getTime());
    It prints
    10800000
    I am currently using java version "1.4.1_02"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_02-b06)
    Previosly used an older version of java and didn't encounter this problem.
    Can some shed any ideas why this is happening?

    This "Time" is java.sql.Time, right? Unfortunately it's a subclass of java.util.Date, so internally there must be a date as well as a time component. And I'll bet the default date that gets used in the valueOf() method is one that isn't in daylight saving time -- maybe 1970 January 01 -- and today is (at least where I am it is), so that's where the hour difference comes from.
    Try resetting your system clock to some time in November and see if it still happens.

  • Changing Appointment STOP Time From One Hour to Half-Hour.

    On my desktop and on my Centro, appointment "stop" times always default to one hour from the "start" time. I would like to change this so the default is to a half-hour interval. However, I cannot find a setting for this, either on my desktop or on the mobile device.
    I'm changing the "stop" time manually for each entry, which is inconvenient. Is there any way to make it automatic?
    -Paul-
    Post relates to: Centro (Sprint)

    Have you tried this procedure to enter an end time?
    Using the keyboard, enter a starting hour and minute for the event. (For example,
    enter 545 for 5:45.)Select the End Time box, and then select the ending hour and minute for the event. 
    Click on the following link for the support page for your device on the kb.palm.com webpage.
    http://www.palm.com/us/support/centro/centro_sprint/
    There are links on the page to the user guide, troubleshooting, how to's, downloads, etc.
    Post relates to: Palm i705

  • It says iCal will default events with no end time to one hour..and mine used to..but since I upgraded to Lion it doesn't.  Any suggestions as to how I can get it to default events to one hour?

    My iCal used to default to one hour when I posted an event with a start time and no end time.  The user guide says it will default to one hour.  Since I started using OS Lion, my calendar doesn't do that.  Can anyone suggest a way for me to get the calendar to default to one hour again?  Thanks.

    Dana,
    Here are some iCal data entry tips from iCal Help:
    Enter a name, date, and time duration for the event, and then press Return.
    For example, you can enter “Super Bowl Party Feb 5,” “Movie with Rebecca on Friday at 7pm,” “Soccer Game on Saturday from 11am-1pm,” or “Breakfast with Jon,” and then press Return.
    If you don’t enter a time duration for the event, iCal sets the event’s duration to 1 hour.
    If you don’t enter any time information for the event, iCal makes the event an all-day event.
    If you enter “breakfast” or “morning,” iCal sets the event to start at 9 a.m.
    If you enter “lunch “ or “noon,” iCal sets the event to start at 12 p.m.
    If you enter “dinner” or “night,” iCal sets the event to start at 8 p.m.

  • One hour off downlaod

    Sine daylight savings time my 8830 makes everything one hour later on the handheld. I have installed all the DAT patchs for XP and for MS Sever 2003 and MS Exchange. I found plaae on the BB web site that allow you to download a DST patch for the Blackberry but the list of version it applies to ends with 4.2.0.73. Mine is running 4.2.2.176. Is there anyway I can correct this?

    1) Make sure your BlackBerry is actually set for the correct time and time zone.
    2) make sure your PC (where your email client runs) is set to the correct time and time zone.
    3) Go ahead and install the DST patch on your BlackBerry. If its not needed it wont be applied.

Maybe you are looking for

  • Downloading files through a MIDlet

    Hi there, I am new to the J2ME network connections API, especially for downloading data through a MIDlet. I have a small question I hope you could provide some assistance on. I was wondering if there was a way to download data (ie: a text file) from

  • Bought iPhone 4 from colleague and I want to use it in India

    Hello Community Members, I have recently travelled to Colorado for a project and my colleague bought iPhone 5, so I just happen to ask him to sell me his iPhone 4, so he did. Now, I have purchased this iPhone 4 from him. It's an A1332 model. So I kno

  • IPod Music Problems with the Latest Version

    So I am happily using my iPod and iTunes 7 software with my Win2000 notebook and everything was working great. Then I get a notice that there was a new version of iTunes (7.1) and do I want to download. So I download and then install the new version.

  • Concatenaion of Datasets.

    I have two data sets. as I represented in below figure. http://img810.imageshack.us/img810/4552/required.jpg There is a 'product' (string) in first data set and it should be joined to 'item' in second dataset and put together in a single table. I suc

  • Forms9i: Deployment and LOGON Built-In

    Hello! As long as I run a logon form with the following code on my local machine using OC4J shipped with 9iDSR2 everything works as expected. Providing the right credentials the else path will be executed. LOGON(:a.usr_name,:a.usr_pwd||'@'||:a.db,FAL