Setting Time zone to UTC/GMT

Dear Everyone,
I have the code for setting the time zone to moddle europe
BEGIN:VTIMEZONE
TZID:MET-1METDST
BEGIN:DAYLIGHT
RRULE:FREQ=YEARLY;UNTIL=20750331T020000Z;BYMONTH=3;BYDAY=-1SU
TZNAME:Middle European Time\, Middle European Time Daylight Savings Time
TZOFFSETTO:+0200
TZOFFSETFROM:+0100
DTSTART:19960325T020000
END:DAYLIGHT
BEGIN:STANDARD
RRULE:FREQ=YEARLY;UNTIL=20751031T030000Z;BYMONTH=10;BYDAY=-1SU
TZNAME:Middle European Time\, Middle European Time Daylight Savings Time
TZOFFSETTO:+0100
TZOFFSETFROM:+0200
DTSTART:19961025T030000
END:STANDARD
BEGIN:DAYLIGHT
RRULE:FREQ=YEARLY;UNTIL=19950331T020000Z;BYMONTH=3;BYDAY=-1SU
TZNAME:Middle European Time\, Middle European Time Daylight Savings Time
TZOFFSETTO:+0200
TZOFFSETFROM:+0100
DTSTART:19910325T020000
END:DAYLIGHT
BEGIN:STANDARD
RRULE:FREQ=YEARLY;UNTIL=19950930T030000Z;BYMONTH=9;BYDAY=-1SU
TZNAME:Middle European Time\, Middle European Time Daylight Savings Time
TZOFFSETTO:+0100
TZOFFSETFROM:+0200
DTSTART:19910924T030000
END:STANDARD
END:VTIMEZONE
I need to set the time zone to UTC/GMT with there valid values. Can someone please share the code needed to set it.
I tried to use the below but does not seem to work...
s += "TZID:/ALTEXIA/UST\n";
s += "BEGIN:STANDARD\n";
s += "RRULE:FREQ=3DYEARLY;UNTIL=3D19950930T030000Z;BYMONTH=3D9;BYDAY=3D-1SU\n";
s+= "TZNAME:UTC\n";
s += "TZOFFSETTO:+0000\n";
s += "TZOFFSETFROM:+0000\n";
s += "DTSTART:19910924T030000\n";
s += "END:STANDARD\n";
s+= "END:VTIMEZONE\n"
Thanks for your support
Joyce

Jean-Philippe,
Thank for sharing the VCALENDAR.
I tried to create the event using the code below
MIME-Version: 1.0
Content-Type: text/calendar; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
BEGIN:VCALENDAR
VERSION:2.0
PRODID:Oracle/Oracle Calendar Server 9.0.4.1.0
BEGIN:VTIMEZONE
TZID:/ORACLE/OCAL/UCT
BEGIN:DAYLIGHT
RRULE:FREQ=3DYEARLY;UNTIL=3D20750407T030000Z;BYMONTH=3D4;BYDAY=3D-1SU
TZNAME:Universal Coordinated Time
TZOFFSETTO:+0000
TZOFFSETFROM:+0000
DTSTART:19910401T030000
END:DAYLIGHT
BEGIN:STANDARD
RRULE:FREQ=3DYEARLY;UNTIL=3D20751031T010000Z;BYMONTH=3D10;BYDAY=3D-1SU
TZNAME:Universal Coordinated Time
TZOFFSETTO:+0000
TZOFFSETFROM:+0000
DTSTART:19911025T010000
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
X-ORACLE-EVENTINSTANCE-GUID:I1+33555470+1000+0+487005621
X-ORACLE-EVENT-GUID:E1+33555470+1000+487005621
X-ORACLE-EVENTTYPE:APPOINTMENT
UID:xxxyyyz
TRANSP:OPAQUE
SUMMARY:utc event test
STATUS:CONFIRMED
SEQUENCE:0
RRULE:FREQ=DAILY;COUNT=2;INTERVAL=1;WKST=SU
PRIORITY:0
LAST-MODIFIED:20060607T152021Z
DTSTART;TZID=/ORACLE/OCAL/UCT:20060517T010000
DTSTAMP:20060607T152027Z
DTEND;TZID=/ORACLE/OCAL/UCT:20060518T010000
CREATED:20060607T152021Z
CLASS:PUBLIC
ATTENDEE;X-ORACLE-SHOWASFREE=BUSY;X-ORACLE-GUID=14B81370AE33F033E040578C7009655E;CUTYPE=INDIVIDUAL;RSVP=FALSE;CN=User_26191 jguguy_standaloneserver_26191;PARTSTAT=ACCEPTED:mailto:[email protected]
END:VEVENT
END:VCALENDAR
and the code to insert as
try {
mySession.storeEvents(Api.CSDK_FLAG_STORE_CREATE | Api.CSDK_FLAG_STORE_INVITE_SELF ,s,results);
System.out.println("Event Created");
catch (Api.StatusException e)
     System.out.println("storeEvents returned status'" + e.getMessage() + "'");
     System.out.println("storeEvents returned status'" + e + "'");
     e.printStackTrace();
The code seems to succeds printing "Event Created" but There is no event created in the calendar. I am using the Calender version 9.0.4.
Best Regards
Joyce

Similar Messages

  • Setting time zones at sea?

    Is there any app for Iphone that will let you set time zones by number offset from UTC. I am often in time zones that have no city in them, so they are not listed in the clock app.

    Maybe I am not being clear.  Let's try again.
    We don't have cell-phone coverage in the middle of the ocean. 
    I turn my cell and wifi off when we get off shore to save power. 
    I use the iPhone as a little computer.  I am looking for a way to have my four or five wall clocks that I used to have on the office wall, on my iPhone. 
    During doing my job I like to be able to know:
    What time is it in the time zone I am in.
    What time is it on my best friend's ship.
    What time is it on the port we left.
    What time is it on in the port we are going to.
    And what time it is in UTC
    I just am looking for an app that gives me the ability to set time clocks by all time Zones around the world by zone offset from UTC.
    Setting time zones by city names is useless to me.
    Setting time zones by pinging the Internet or cell towers can not be done where I am at.

  • Set Time Zone automatically doesn't work?

    Just returned from a trip to Greece (back home now in Phoenix). Noticed that even connected to wifi in different locations, when "set time zone automatically" was clicked on in general settings, time displayed on iPad seemed stuck in EST. (I made a stop in Philly on way to trip, not sure if that has to do with anything.)
    If i click "set time zone automatically" to off, for some reason my iPad defaults to Washington DC, even though in all my calendar/email settings i have Phoenix set as local time zone. I can change Washington DC to Phoenix and correct time displays on iPad. Just wondering why i can't set it automatically to display correct local time?
    Thanks for any suggestions....

    Ok thanks. Yeah, I ended up using the World Clocks.
    Where it gets interested is, iCal. If you're in a foreign country that's, say, 4 hours ahead, and you add iCal entries to your Calendar while you're out there, should those entries reflect the local time or the home time?
    Also, if you're set the Alarm to wake you up at 8:00am, and you're away on holiday, surely it will go off at home time, not local time, thus going off at the WRONG time.

  • Location Services: Setting Time Zone... Always Active

    Just wondering if anybody else is experiencing the always active SETTING TIME ZONE setting in LOCATION SERVICES / SYSTEM SERVICES.
    It's always purple - never stops polling for location.
    I've noticed a change in the battery life for my iPhone 4 and I think this is the culprit.
    Is that setting needed for anything in particular or can it safely be turned off?
    Thanks for any advice you have!

    Grrrrrr, now (after the iOS 5.0.1 update), this is happening not only on my iPad, but also on my iPhone 4S, which never had the problem on iOS 5.0.  So, instead of going from 1 to 0 devices having the problem, I've gone from 1 to 2 after the update!  Isn't this the opposite of what was supposed to happen?
    Letting the iPhone sleep for a while, shutting it off and turning it back on, resetting it with home+power, all do nothing.  Weirdly, it *wasn't* doing this right after I did the update; it only started about a day or so later.
    ****Update: and now it's off again, but it did come on for about 10 minutes and then turned off again.  Hmmmmm. I agree that having the status bar icon enabled is a good idea, to at least be able to see when this happens and disable it if you're in a situation where battery life matters.

  • AppleScript or Automater to Set Time Zone (or just the time)

    Hi,
    I am trying to have a script that will change the timezone to UK - (ie reduce my macbook by one hour from European time) before I run an application.
    I use a MythTV backend on my network that is in UK time, and I am in Europe. However, the mythfront end I have on my mac needs to be in same timezone for it to work with the backend.
    However, instead of having to go to the System Prefs before I want to run the myth front end, I'll like to build a Automater workflow (app) that changes time to UK time, runs the mythfront end (and changes back once I close myth front end).
    My problem is I can't get any workflow to work to change the timezone. I found a workflow on the net for Automater, but this doesn't work. The auomater app was called 'Set Time Zone 1.0 - by NyghtHawk productions' but only returns this error about not being able to find this file:
    /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support/syst emsetup-panther.
    (which I guess is obvious as I'm using Snow leopard and not panther)
    Does anyone know of a working way to script setting the time in Mac Os X ?
    Thanks in advance
    Alex

    I have solved the Applescripting of System Preferences to change the Time Zone.
    My problem is that my time zone (Melbourne - Australia) causes my 3rd gen iPod nano to lose its time zone and time settings when it is _plugged in_ to my mac (Note: Not when it is synchronised).
    I have a pair of Applescripts: the first sets the time zone to Noumea, run before the iPod is plugged in and the second resets the time zone to Melbourne after the iPod is physically disconnected.
    timezone=Noumea
    This script is run BEFORE plugging in the iPod.
    This ensures the iPod time zone is not NUKED.
    The corresponding script to reset time zone is
    run when iPod is physically disconnected
    tell application "System Preferences" to activate
    tell application "System Events"
    tell process "System Preferences"
    (* get Date & Time preference pane *)
    tell menu bar item "View" of menu bar 1
    delay 0.5
    click menu item "Date & Time" of menu 1
    end tell
    (* get Time Zone subpane *)
    tell tab group 1 of window "Date & Time"
    click radio button "Time Zone"
    tell group 1
    set value of combo box 1 to "Nouméa - New Caledonia"
    We need to focus the combo box before "hitting" return
    PROBLEM: we dont know if it is already focused
    a) if is already focused the first 'return' key sets the time zone
    b) if was not focused the first 'return' key does nothing
    the 'tab' key will then focus it
    and then the second 'return' key sets the time zone
    keystroke return & tab & return -- make it stick
    delay 0.5
    end tell
    end tell
    end tell
    end tell
    timezone=Melbourne
    This script is run AFTER physically disconnecting the iPod.
    This ensures the iPod time zone is not NUKED.
    The corresponding script to set up the time zone to Noumea
    is run BEFORE iPod is physically plugged in
    tell application "System Preferences" to activate
    tell application "System Events"
    tell process "System Preferences"
    (* get Date & Time preference pane *)
    tell menu bar item "View" of menu bar 1
    delay 0.5
    click menu item "Date & Time" of menu 1
    end tell
    (* get Time Zone subpane *)
    tell tab group 1 of window "Date & Time"
    click radio button "Time Zone"
    tell group 1
    set value of combo box 1 to "Melbourne - Australia"
    We need to focus the combo box before "hitting" return
    PROBLEM: we dont know if it is already focused
    a) if is already focused the first 'return' key sets the time zone
    b) if was not focused the first 'return' key does nothing
    the 'tab' key will then focus it
    and then the second 'return' key sets the time zone
    keystroke return & tab & return -- make it stick
    delay 0.5
    end tell
    end tell
    end tell
    end tell

  • Why is the location services arrow constantly on for setting time zone on iOS 5.1?

    I have updated to iOS 5.1 OTA (Over The Air, not by connecting to iTunes and updating) on my iPhone 4S and the purple location services arrow is constantly on in the status bar when setting time zone and automatic update of date and time are turned on simultaneously. I had this problem prior to the update, but I understand that not everyone has this issue as my friend has these two settings on and doesn't have the problem. I have tried restoring and all that (obviously), but not restoring and setting up as new.
    Somebody please help because it's an obvious fault in the system if nothing else. I have heard somebody else complain about this and the had a 32 GB 4S the same as me. I don't really see why memory should matter but my friend who doesn't have the problem has a 16GB 4S.
    Also, I am not in an area that is between time zones when this is happening.

    If it is turned on I can't be sure if anything else is using my location (at a glance) since the arrow is constantly showing. I am aware that this function will use battery power, maybe constantly, but the arrow shouldn't be constantly showing. If it should, then why doesn't my friends iPhone show it? Either way there is a problem here.

  • IPhone 4s Battery life, Location Services, Setting Time Zone

    So, many threads and articles on the internet are claiming that turning off "setting time zone" in location services (under system services) solves their battery drainage issue.
    I've tried turning off location services together with other things, and while there seems to be an improvement, I don't really think it is solving the problem completely in my case.  For example, even after:
      - a full iphone restore from iTunes
      - no third party apps
      - the phone in Airplane mode (no Wifi or cellular connectivity)
      - all location services off
      - iCloud syncing completely off
       - Facetime off
       - iMessage off
       - bluetooth off
        - WITHOUT using the phone at all
    ... I seem to be lsoing about 25 % of charge every nine hours, which extrapolates to 36 hours time, total.
    ... but this is with  ll networking functions turned completely off (set up basically as an old-time PDA but without actually using it) and without turning the phone on.
    Apple claims a time of 200 hours standby with all services on, connected to a WiFi access point with only "ask to join networks" set to the off position.
    How is that possible?
    Looking at my phone usage under General settings, even with all the networking functions turned completely off (as above), my phone is spending about 90 % of time "in use." But I'm not using it!
    At least with this phone, it seems like not all is explained by the "setting time zone" service under location services. Even with the screen off, no networking functions, and limited functionality, it appears to be cranking away at something.
    Can anyone else reproduce this?

    Grrrrrr, now (after the iOS 5.0.1 update), this is happening not only on my iPad, but also on my iPhone 4S, which never had the problem on iOS 5.0.  So, instead of going from 1 to 0 devices having the problem, I've gone from 1 to 2 after the update!  Isn't this the opposite of what was supposed to happen?
    Letting the iPhone sleep for a while, shutting it off and turning it back on, resetting it with home+power, all do nothing.  Weirdly, it *wasn't* doing this right after I did the update; it only started about a day or so later.
    ****Update: and now it's off again, but it did come on for about 10 minutes and then turned off again.  Hmmmmm. I agree that having the status bar icon enabled is a good idea, to at least be able to see when this happens and disable it if you're in a situation where battery life matters.

  • How to set time zone for a session in Client Only installation

    Environment:
    OS : Unix (HP-UX 11.0)
    Oracle DB : Ver 8.0.5
    Developer : Ver 1.6 ( Client only Installation)
    Developer also on Unix.
    RDBMS and Developer Installed on different
    home directories.
    Our development is Forms 4.5 on X windows.
    Runtime is forms character mode.
    Probelm Description:
    To run the application I am using TWO_TASK to connect to the database. In our application we have to take care of time zones. For that in previous versions(NO TWO_TASK used) I used TZ unix environment variable, to get time zone dependent time wherever sysdate is used.
    Now because I am using TWO_TASK, oracle is no more using users TZ settings.
    Question : Is there any way I can make oracle to use the TZ environment setting

    Thanks for replying Johnny!
    What you are referring to is adding a city. I need to know how to set the time zone in settings -> Date & Time -> Timezone. Unless & untill this is set properly the iPod will never show me the right time. Please help me with it.
    I will definately use your advice on the second query.
    Thanks once again!
    Windows XP Pro

  • How to display system time zone like UTC+8

    Hi All,
    I got a requirement where  I need to display time zone in the output. If I take sy-zonlo it is taking user's time zone and giving output like CET or CST but I want the system time zone to be displayed like UTC+8.
    Regards,
    Suresh.

    Hi,
    FM GET_SYSTEM_TIMEZONE  gives time zone as PST or CET like that but I want output as UTC+8 or UTC-6.
    Regards,
    Suresh.

  • Setting time zone

    This issue come to light becasue of the daylight saving time change. If I leave the option (under the date and time) section set to automatic  it chooses the wrong time zone... case in point.. my phone was set to auto.. I noticed the time zone was Calgary, my time zone is Vancouver. I turn off auto, change the time zone, click auto and it goes back to Calgary
    Rod

    I'm in Phoenix.  Yesterday my iPhone (according to "Date & Time") showed me in Cupertino. Today it thinks I'm in Denver.  Neither Power On/Off or Airplane Mode On/Off make any difference, still thinks I'm in Denver.
    This is sort of OK from a time standpoint.  Before the DST change Phoenix and Cupertino were the same time.  After the DST change Phoenix and Denver are on the same time.  However now calendar items that I create on the iPhone are incorrect every where else (Google calendar etc.). If I turn off "Set Automatically" and force my iPhone to Phoenix then calendar events are correct.
    So anyway "Set Automatically" is Off for me.  Kind of a drag 'cause it's nice to have the iPhone automatically be on the right time when I travel.

  • Trouble setting time zone for new location in networking

    When I try to set a time zone for a new location it sets this as the time zone for all locations. I must be missing something. Any suggestions?
    "Lily" my PowerBook G4 1.67GHz   Mac OS X (10.4.2)   40GB iPod 3G

    If you're doing this in the Date & Time PrefPane, then, IIRC, that's normal behavior. That controls the date and time settings for the computer. See Setting the date, time, and time zone description in Help.

  • Cannot set Time Zone in iPad2 after iOS 7 update

    The Time Zone setting keeps on spinning.  Any ideas on resolving this in order that I can setup the appropriate time zone?

    Perhaps you need to physically trash the preference file. I'm not sure which one it is as I'm not at the Mac right now, but you could try com.apple.preferencepanes.plist. There might be a more specific one relating to the time zone pane itself though.

  • Setting Time Zone location marker still lights up in iOS 5.0.1 . Does this happen to you?

    I have updated my iphone 4 to ios 5.0.1 ota and when the phone boots up the time zone location icon lights up i know this because i checked it in location services system . So does this happen to you ?

    Yes, I saw this happen as well a week after upgrading to iOS 5 it started showing up all the time. So I shut the phone down and rebooted and the problem went away.

  • IOS 5.0.1 setting time zone 15 minutes and counting...

    15 minutes ago the lovely location services icon popped up. It's still up. Phone battery has dropped 3%. Nice update Apple...surely fixed the problem. Setting back to off.

    I'm having the same problem. Quite frustrating.

  • How get current time zone offset ?

    Hi,
    I am facing to a problem related getting time zone offset.
    Below code is used for my application :
    NSDate* sourceDate = [NSDate date];
    NSTimeZone* destinationTimeZone = [NSTimeZone systemTimeZone];
    timeZoneOffset = [destinationTimeZone secondsFromGMTForDate:sourceDate] / 3600;
    But sometimes seems that above code is getting work wrong. For example :
    Knoxville, TN : time zone offset should be -5. But my code resulted it as -4.
    http://www.timeanddate.com/worldclock/city.html?n=843
    This web is related my issue. Here is :
    Standard time zone: UTC/GMT -5 hours
    Daylight saving time: +1 hour
    Current time zone offset: UTC/GMT -4 hours
    Actually I don't know how get to "Daylight saving time:".
    Can you correct this issue for me ?
    Please advice.
    Thanks.

    Hi Raiden -
    RaidenMAC wrote:
    Knoxville, TN : time zone offset should be -5. But my code resulted it as -4.
    I think your code is giving you the correct offset for Knoxville on today's date. The offset for Eastern Standard Time (EST) is -5, but Knoxville is currently on Eastern Daylight Time (EDT), which is one hour later than EST. (-5) + 1 => (-4), which is what your code computed.
    Note that [secondsFromGMTForDate:|http://developer.apple.com/library/ios/documentation/Co coa/Reference/Foundation/Classes/NSTimeZoneClass/Reference/Reference.html#//appleref/doc/uid/20000190-CACDIAIC] is correcting for daylight savings time. That's why you need to pass the date to that method. If you pass a "summer" date, the return offset will be one hour more than it will be for a "winter" date (usually early November to mid March). For example, try moving the date forward 60 days like this:
    NSDate *sourceDate = [NSDate dateWithTimeIntervalSinceNow:3600 * 24 * 60];
    NSTimeZone* destinationTimeZone = [NSTimeZone systemTimeZone];
    int timeZoneOffset = [destinationTimeZone secondsFromGMTForDate:sourceDate] / 3600;
    NSLog(@"sourceDate=%@ timeZoneOffset=%d", sourceDate, timeZoneOffset);
    The above should give you the offset for Knoxville on Dec. 7, 2010, which is a winter date.
    Actually I don't know how get to "Daylight saving time:".
    You can test a NSTimeZone object with [isDaylightSavingTimeForDate:|http://developer.apple.com/library/ios/documentat ion/Cocoa/Reference/Foundation/Classes/NSTimeZoneClass/Reference/Reference.html#//appleref/doc/uid/20000190-CHDCJGHE], but you don't need that information when you obtain the offset with secondsFromGMTForDate:.
    - Ray

Maybe you are looking for

  • Unable to install SQL Server 2012 on my Surface 3 computerr w/Windows 8.1 as the OS

    Another user, Cheer08, has replied to a thread you have subscribed to in the SQL Server Express Forum. Here are the error messages: Error 2 Error 1 Hello, This error is related to Microsoft Visual C++ 2005. Could you try to download and install Micro

  • Final Cut Pro X looks out of place in yosmite

    In yosmite fcpx looks really weird... Its icon and overall design hasn't been updated for yosmite

  • HT4650 what's the best free virus program for Mac?

    What's the best free virus program for the Mac?Not just for viruses, but removing all the duplicate folders and tuning up my mac. I'm not exactly sure what all the Activity Monitor stuff is, but I know when my Mac is sluggish and slow. Any ideas? (No

  • ITunes merges unrelated songs into one album?

    Hey all, I've tried repeatedly to fix this problem and haven't had any luck. I recently added an album to iTunes (11.4) and the following things happened: 1) Under "albums" view, each song from the album had its own separate entry in albums (same alb

  • Question about frequent log switches

    I support an Oracle 10g database (10.2.0.4) and database activity has increase to the point that, during the heaviest parts of the day, log switches are occurring too frequently (15 - 20 times per hour!). We also utilize Data Guard to replicate the d