Time subtraction within a Calendar instance

Hello all, quick question about time subtraction within a Calendar instance.
Calendar calendar = Calendar.getInstance();
System.out.println(calendar.getTime()); // Tue Apr 07 11:14:24 EDT 2009
calendar.set(Calendar.MINUTE, -10);
System.out.println(calendar.getTime()); // Tue Apr 07 10:50:24 EDT 2009Shouldn't the latter time be "Tue Apr 07 11:04:24 EDT 2009" instead?
Thanks,
wf

Read the docs for set() more closely. It doesn't say it adds time. Also look for another method that might add time, since that is what you are doing.

Similar Messages

  • How to use multiple profiles within the same instance of Thunderbird

    About a month ago, I had Thunderbird configured with three profiles,
    and all three could be used within a single startup/instance of
    Thunderbird. That PC is now gone. I have re-configured the three
    profiles on a new PC, but am having trouble making all three
    useable within the same instance of Thunderbird. Can you help?
    Both PCs are/were Windows-7 64 bit.

    Thunderbird only opens on the default if one profile
    or
    if Profile Manager is instructed to ask at startup it will allow you to choose which Profile to open else it opens on the last Profile used..
    So it shows one Profile at a time in one instance of Thunderbird.
    However, one Profile can have many mail accounts.
    eg: I run 4 mail accounts in one Profile.

  • Multiple time zones for one calendar entry

    I'm running iCal on Lion 10.7.4 , as well as the Calendar app on iOS 5.1.1 on my iPhone and my iPad. When traveling, I sometimes have a starting time in one time zone and an ending time in another. (When flying from NY to CA, for example.) Is there some way I can have two time zones within a given event for cases such as this? I've turned on Time Zone support in iCal, but that only allows me to set a one-off time zone for an entire event.
    Microsoft Outlook on a Windows machine allows for this; is there any way for me to do it on my Mac, iPhone, or iPad?

    Hi,
    You could set the event, then change the timezone to the destination one and then set the end time. When you switch timezones the start and end times should change in iCal (unless the event is set to floating).
    John M

  • How to change the day and time seen on the calendar

    Hi.
    I am a bit confused as to how to restrict the day and time shown on a calendar.
    The ical help says this:
    To change the days of the week or the number of hours that appear in the main calendar view, choose iCal > Preferences, and make your choices from the Week and Day pop-up menus in the General pane. For example, you can choose to only see the hours from 9AM to 5PM on Monday through Friday.
    However, in my preferences pane, i don't have a either a week or day pop up menu that i can see, so i can't seem to restrict these fields. It's really frustrating as calendars are beginning at 1am!!!!
    Anybody got any ideas?
    Thanks
    David Tobin

    OK, but what did the help menu mean when it said..
    To view the day's, week's, or month's events, click the Day, Week, or Month button at the bottom of the iCal window.
    To change the days of the week or the number of hours that appear in the main calendar view, choose iCal > Preferences, and make your choices from the Week and Day pop-up menus in the General pane. For example, you can choose to only see the hours from 9AM to 5PM on Monday through Friday.
    To change which months are shown in the mini-month calendar (in the lower-left corner of the iCal window), click the arrows above the mini-month calendar. To see more than one month, drag the mini-month divider (the horizontal gray bar above the diamond) upward.
    To see events that are earlier or later in the day, use the scroll bar on the right side of the main calendar view.
    To change the range of time in the main calendar view that is not shaded (representing your "normal" day), choose iCal > Preferences. In the General pane, choose the times you want to appear in white (not shaded) from the "Day starts at" and "Day ends at" pop-up menus. All times outside that range are shaded.
    This suggests that you should be able to limit the hours actually shown on the calendar to a set range as opposed to just changing the shaded area.
    Have you any idea how to achieve this, as i don't see the popup menu suggested with...
    To change the days of the week or the number of hours that appear in the main calendar view, choose iCal > Preferences, and make your choices from the Week and Day pop-up menus in the General pane. For example, you can choose to only see the hours from 9AM to 5PM on Monday through Friday.
    I am confused!!
    Any other ideas?
    David Tobin

  • TS1702 The Calendar app that came on my i4S Phone does not sync the correct time for items posted on my Yahoo Calendar.  Actually, they post exactly 4 hours earlier than the correct time on my Yahoo Calendar.  Does anyone have a "fix" to correct the "time

    The Calendar app that came on my i4S Phone does not sync the correct time for items posted on my Yahoo Calendar. Actually, items post exactly 4 hours earlier than the correct time on my Yahoo Calendar.   My i4S is in the correct New York time zone.  Help?

    I posted this question a while ago and didn't receive any responses but there are a lot of people who have viewed it and 10 have said they have the same question so I thought I would update you that I added my nanny to my exchange server account (created an email for her) and I send all invites to that email address and they work.  So sending invites from an exchange server account to a non-exchange server account apparently is a bug so to solve it, get on an exchange server I guess.

  • Incorrect time in Live when calendar event accepted on iphone

    When accepting a calendar entry on the iPhone, scheduled for 10:00 PST, it appears in the calendar at the correct time but when the calendar syncs back to Live (Hotmail Calendar) it shows up in live at 2AM, thus an 9 hour difference.
    Me time zone support on the iphone is set for Los Angeles and my Live calendar preferences are set to Pacific Time.
    Here is how the calendar event got on the phone. From work, I scheduled a meeting with my home e-mail address using Lotus Notes at work. The invitation arrived on my iPhone and I accepted it into my personal Live calendar. (I have two Live calendars, my personal and the US Holidays that sync to the iphone)
    On the iPhone it shows the correct time but on Live it shows 9 hours earlier!
    Any suggestions on how to solve this problem?
    Thanks

    Barry Porter1 wrote:
    look in mail contacts and calendars on phone settings, and be sure your time zone support is your correct time zone.
    Barry,
    As I indicated above, this is set and is correct, but for some reason things dont get scheduled on the default time zones.
    "My time zone support on the iphone is set for Los Angeles and my Live calendar preferences are set to Pacific Time."

  • I use the Icalendar at home, at work, and on my Iphone.  I don't want to have to "sign in" every time I need my calendar.  How do I stay signed in?  I have checked the "keep signed in" box, but it does not work.

    I use the Icalendar at home, at work, and on my Iphone.  I don't want to have to "sign in" every time I need my calendar.  How do I stay signed in?  I have checked the "keep signed in" box, but it does not work.

    Welcome to the Apple community.
    Staying signed in at iCloud.com is not a problem for me. Try resetting your browser or emptying its cache.

  • HT4576 "Time Zone Support" in Calendars should be renamed to "Override Time Zone Support"

    So, I live on the East coast and notice, while on a trip just outside Cupertino, that my iPhone Calendar wasn't updating to the the local time, even though my iPhone had correctly updated to PST.
    Finally, at the end of my trip, oh so nigh to Cupertino, I find out that my Calendar's erroneous display of time was due to the "Time Zone Support" configuration option.
    This is a GROSS misnomer.
    iOS requires the specification of a timezone - else the time would be set arbitrarily and would waste the time (NTP) service provided by the cellular provider.
    Thus, the "Time Zone Support" option under "Mail, Contacts, Calendars" should be relabeled to "Override Time Zone Support" AND the ability to assign an event to a time zone should always be available (though defaulting to the current time zone - unless a 'Default Time Zone' configuration option is added).

    The behavior you are seeing is actually inherent in most calendar apps -- the deal is that you are telling your calendar when something happens, not what time.  Our company writes a calendaring+task management app for iPhone called Pocket Informant - we get this same question on occassion, so I wrote up a Knowledge Base article discussing some details (keep in mind - this article discusses some features specific to our app that you won't find in iCal/Calendar on MacOS X):
    http://webis.kayako.com/Knowledgebase/Article/View/123/0/why-do-the-times-change -on-my-appointments-when-i-travel-to-a-different-time-zone
    In iCal/Calendar on MacOS X, when you turn on Time Zone support, you then get to choose the time zone that you are entering your appointment for.  This helps you not have to do the "time zone math" in your head.  Thus, if you are in CST and want to set up an appointment for 6pm PST, you can choose PST in the event editor as you enter 6pm.  Note that while you are in CST, your event will display in your calendar at "CST time" (8pm), but when you fly out to PST, it will show the "correct" PST time. 
    While iCal/Calendar supports "floating time zones", I personally would caution against using them for everything (I mentioned a few reasons why in the above kbase article).  Use those for events that truly are "time driven" rather than "point in time" driven (such as "I want to go jogging every morning at 5am no matter what time zone I'm in). 
    Hope that helps some!

  • How can I change the time zone for a calendar entry with iOS 7?

    I want to make a new entry in my calendar (iOS 7) using a different time zone as the one I'm located in. There isn't any option to choose the time zone like there is in OS X.
    I know I can switch off the option to automatically change the time zone in the preference pane of Mail, Contacts and Calendar to get the option in calendar but I want to use this automatic switch.
    Is there any option to change the time zone of a calendar entry without loosing this automatic switch?

    Got it!
    In your backing file you'll need the following in your handlePostbackData method:
    BookBackingContext bookCtx = BookBackingContext.getBookBackingContext(arg0);
    bookCtx.setupPageChangeEvent("PageLabel");

  • How to use time zone settings with calendar events ??

    After looking through the questions on time zones and synchronization, I still cannot get my Palm Centro to operate the way I think it should.
    I have a Verizon Centro, am using Windows XP with Outlook, and synching via the Hotsync manager 7.02 over a USB cable.  I am not using Palm Desktop.
    I am expecting events to shift time in the calendar when I change the time zone, but they do not.
    I am preparing for a trip.  I enter several test events into MS Outlook placing the events to occur in a different time zone into my calendar at the time the event would occur in my home time zone (NY).   For example, a meeting from 9-10 AM in Los Angeles is put in my MS outlook calendar as 12-1 PM on the day of the meeting.  Then I sync, with the time zone of my Centro and Outlook set for New York.  The Centro is set to update Date, Time, Zone automatically from the network in New York. The meeting event appears as 12-1 PM on the correct day.
    Then I turn off the Centro phone (ie disconnect from the Verizon network), change the time update to "Nothing" -- ie entirely manual, change the time zone to Los Angeles and set  the time to the correct time in Los Angeles.   I expect the meeting to shift to 9-10 AM in my Centro calendar, but it does not !!!!!  I try other combinations -- Leave the time update on Date and Time automatic, and change the time zone to Los Angeles, etc.  I think I tried all the combinations.  Throughout, I leave the Centro phone off of the Verizon network.  I cannot get the meeting to change its time in the new time zone.
    What is the trick ??? What did I miss ??
    You might ask why I am trying this with the phone turned off -- that is because I am really going much farther than LA, and into a GSM network where I will simply use the Centro as a PDA.
    Any advice appreciated.
    Post relates to: Centro (Verizon)
    This question was solved.
    View Solution.

    thepoeta --
    Thanks for the response.
    Indeed my preference was not set "new events use time zones".
    Meanwhile, I had loaded all the applointments from Outlook, about 20 of them,
    figuring I would just move them manually en route.
    I will play with the time zone preference, but,
    is there any way to identify the existing appointments in the
    Palm as belonging to a different time zone, just using the Palm Centro ?
    Thanks,
    Neal

  • Read an Attachment attached within a process instance

    Hi
    I am using BPM 11.1.1.6, can someone tell me how do I read and parse an attachment attached within a process instance. Thank you.
    Regards
    Venkat

    Thank Sudipto for the link.
    Experts,
    I used the API as suggested in the first link and managed to iterate through the attachments attached in a process instance but when i am trying to read the attachments using the getInputStream() its returning null, all the other properties of the taskattachment returns correct information. Is this a known bug?? The sample code snippet is as below:
    List attach= task.getAttachment();
    int i=0;
    for (Object obj :attach){
    i=i+1;
    AttachmentType taskAttachment = (AttachmentType)obj;
    System.out.println("Task Attachment " + i + " " + taskAttachment.getName());
    System.out.println(taskAttachment.getMimeType());
    System.out.println(taskAttachment.getSize());
    InputStream inpStream= taskAttachment.getInputStream();
    if (inpStream == null){
    System.out.println("Stream is empty");
    }

  • I have to enter the remember password login at least twice each time I open a new instance of Firefox. Is there a fix for this problem?

    I have to enter the remember password login at least twice each time I open a new instance of Firefox. Is there a fix for this problem?
    == This happened ==
    Every time Firefox opened
    == installed 3.5

    @the-edmeister
    Thanks for the advice. In my case, it is sufficient to '''uncheck''' " Saved passwords".
    ('''''Preferences -> Privacy -> Clear History when Firefox closes -> Settings -> Saved Passwords''''').
    Great to have Sync. :)

  • Why every time I receive a calendar invitation my iCal crashes?

    Every time I receive a calendar invitation, even if I don't open it, iCal will automatically schedule that as an appointment. The time set up though will be shown as a grey color and I cannot make any change, or even access it. On top of it, if I try to access that day, when I am viewing my calendar as a day (day, week, month...) iCal will definatelly crash and when I try to re launch it will open but I would not be able to see that day in day view again.
    To solve the problem I need to go to my iCal on my MAC and reject the invitation. Only then my calendar either in my iPhone or iPad will relaunch properly.
    Such a pain.

    The iphone and ipad must be connected to the same icloud account.  Are you by chance using different IDs to connect from each device?

  • ICloud Outlook add-in causes Outlook to hang for 30-120 seconds each time I enter the Calendar.

    The iCloud add-in for Outlook seems to be causing some issues with my Outlook calendar: each time I go from the Mail tab to the Calendars tab, Outlook freezes for a minute or two and then resumes functioning.
    The problem is definitely with the iCloud add-in itself: if I disable the add-in, my iCloud calendars still appear (but do not sync), and Outlook works fine. The freeze does not seem to happen the first time I go into Calendar after starting Outlook, but every subsequent time it does happen.
    I am using Outlook 2010 (32-bit) on Windows 7 (64-bit). I do not know and haven't been able to figure out how to tell if I'm running 32 or 64 bit Apple software on this computer.
    I would appreciate any help, and particularly any thoughts on what the iCloud add-in is actually doing at the moment you go into Calendar view that might be causing problems. Does it sync at that time (and apparently in a poorly designed way)? Or is it just some rendering or other similar issue?

    The sync can be very long, nbut only when you sign in from the Control panel. Once you're in Outlook, I don't think you sync that much.
    I have the same issue using my old PC. Maybe you should check your hard drive, your memory usage and CPU usage. I fixed it by a new laptop, last year. Usually, this is a sign that you're short on memory and you're using the Windows page system memory file. So, your CPU might come short, your hard drive might be too slow or you don't have enough memory..  Otherwise, your hard drive may be too slow and very fragmented, reqyuiing Windows to spin a lot and read bits of files stored everywhere. The solution would be to defragment your hard drive. or worse.. it's a slow hard drive or showing sign of fatigue.
    I'll go with defragmenting the hard drive first, then, the CPU and memory bump.

  • Why do I have two time zones in my calendar?

    With a recent move to a new time zone I now have two time zone in my calendar.  My area code is in a central time zone but have moved to the east coast.
    I have checked my icloud calendar, iPhone settings and each is set to eastern time.

    Hi beachbouy,
    If you need to change the time zone for your calendars in iCloud, use the steps in this article -
    iCloud: Change your calendar’s time zone
    Thanks for using Apple Support Communities.
    Best,
    Brett L 

Maybe you are looking for

  • Multiple VI on a Single Front Panel

    Probably a simple question but I'm having trouble figuring out how to do it. First, I have LabView 2010, Professional Development System I have been trying to learn LabView the hard way.  I've been reading the documentation, starting with Getting Sta

  • Ringtone has stopped

    My Iphone 3G was recently exposed to water.  Most sounds work except ringtone,alerts and games.  Alarm clock and pandora work.  I have tried putting headphones in and out.  Shutting down completely. Nothing seems to be bringing back ringtone.

  • How to transform XML?

    Hi all, As i am very new at this technology, maybe my question is very easy for you, but i need advice very much! Hi, the point is that i generate some XML files using DBMS_XMLGenXML library, but that XML files are not very correct because the charac

  • Picking List

    Dear All, hai , We are not using wharehouse managment.i unable getting the picking list while i am doing delivery. can anyone help me out,how to get the picking list . can we give the number ranges for picking list , if so where we need to mention. p

  • Classes & Beans

    I have a valid class name that I would like to create a bean with. My bean does not allow an empty constructor (MyBean() ). I'm doing the following: Class newClass = Class.forName(className); How can I create a new instance of my bean using that clas