ICS timezone not working - timezone

I have made an ICS feed containing a long list of events. My timezone does not seem to work.
In the sample below you see that my event should start 07:55:00 and end 09:30:00. This is what it should show in my calendar. Instead it shows 09:55:00 and 11:30:00 - an offset of two hours. The timezone should be set to Europe/Copenhagen but this does not have any effect.
Can anyone tell me how I can achieve the right times?
BEGIN:VCALENDAR
PRODID:-//Google Inc//Google Calendar 70.9054//EN
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:PUBLISH
X-WR-CALNAME:Test Calendar
X-WR-TIMEZONE:Europe/Copenhagen
X-WR-CALDESC:Test Calendar
BEGIN:VEVENT
DTSTART:20110926T075500Z
DTEND:20110926T093000Z
DTSTAMP:20111002T133505Z
UID:E9QNQ30EG-5SRB7-QQKL3-2JUUZ-477LBRV4IMSJ78
CREATED:20111002T133505Z
LAST-MODIFIED:20111002T133505Z
LOCATION:B34
SEQUENCE:3
SUMMARY:2abc3c Ma3 CD (B34)
TRANSP:OPAQUE
END:VEVENT
END:VCALENDAR

You've specified that your event starts at 07:55 in UTC - that's what the Z at the end shows. If you want it to be in local time, you shouldn't have the Z, and you should probably specify the time zone there too:
DTSTART;TZID=Europe/Copenhagen:20110926T075500
DTEND;TZID=Europe/Copenhagen:20110926T093000
Alternatively, specify the UTC start and end time using Z, but taking account for the relevant time zone difference - so an event that starts at 07:55 in Europe/Copenhagen at the moment is actually 05:55 in UTC.

You need also to add your time zone TZID in a VTIMEZONE calendar component.
Add this before VEVENT
BEGIN:VTIMEZONE
TZID:Europe/Copenhagen
BEGIN:DAYLIGHT
TZNAME:CEST
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
DTSTART:19700329T020000
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
END:DAYLIGHT
BEGIN:STANDARD
TZNAME:CET
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
DTSTART:19701025T030000
RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
END:STANDARD
END:VTIMEZONE
You can go to link form more info.

Related

Unison fails because it cannot set time stamp

Trying to sync from a mac to a linux machine, I get multiple failures with a message of the following type:
100% 00:00 ETAFailed [www/sandbox/my-vue-buefy-project/node_modules/spdy-transport/lib/spdy-transport/protocol/spdy]:
Failed to set modification time of file /users/guerrini/www/sandbox/my-vue-buefy-project/node_modules/spdy-transport/lib/spdy-transport/protocol/.unison.spdy.1db0b477154fc6ddf40346e8e27082da.unison.tmp/constants.js
to 1970-01-01 at 1:00:00 (0.000000):
the time was set to 2018-04-12 at 8:49:57 (1523515797.000000) instead`
It seems that it cannot set the modification time and that it uses the current time instead. But, unfortunately, after this the synchronisation of all the files with the above modification date fails.
Moreover, I have tried to set modification date to the given time by hand with "touch" and it works.

All-day events in ICS feed published incorrectly by Exchange 2010

I am using the calendar publishing feature of Exchange 2010 to subscribe to a shared calendar on iOS and OS X. My calendar has many all-day events. On iOS and OS X they are incorrectly displayed as 24 hour events that block the entire day:
On Google Calendar they show 12.00am in the title, but otherwise Google does a better job of formatting the calendar:
I have discovered from these posts that Exchange would seem to incorrectly export all-day events in ICS feeds:
iCal feed all day events blank out entire day
ICS feed imported to Google Calendar shows (12:00am) in title for all day events
(Alternatively, Outlook incorrectly creates all-day events on an Exchange calendar.)
One of the offending entries in the ICS produced by Exchange is this:
BEGIN:VEVENT
DESCRIPTION:\n
SUMMARY:Test2
DTSTART;TZID=GMT Standard Time:20150123T000000
DTEND;TZID=GMT Standard Time:20150124T000000
UID:BC80DA81-93EF-4E89-831A-587C797949C4
CLASS:PUBLIC
PRIORITY:5
DTSTAMP:20150314T164745Z
TRANSP:OPAQUE
STATUS:CONFIRMED
SEQUENCE:0
LOCATION:Somewhere
X-MICROSOFT-CDO-APPT-SEQUENCE:0
X-MICROSOFT-CDO-BUSYSTATUS:FREE
X-MICROSOFT-CDO-INTENDEDSTATUS:BUSY
X-MICROSOFT-CDO-ALLDAYEVENT:TRUE
X-MICROSOFT-CDO-IMPORTANCE:1
X-MICROSOFT-CDO-INSTTYPE:0
X-MICROSOFT-DISALLOW-COUNTER:FALSE
END:VEVENT
Apple and Google (unsurprisingly) ignore the MS specific instruction X-MICROSOFT-CDO-ALLDAYEVENT:TRUE. According to other posts on the subject the DTSTART and DTEND should just contain date, without a time component.
As it stands this is very frustrating and it basically makes the ICS feed impossible to use, at least on iOS and OS X. Is there a way to fix this? Or a workaround?
Thank you.
The solution of the problem is not difficult. In the VEVENTs with
X-MICROSOFT-CDO-ALLDAYEVENT:TRUE
change the date-time values to only date values in the DTSTART & DTEND lines
DTSTART;TZID=GMT Standard Time:20150123T000000
DTEND;TZID=GMT Standard Time:20150124T000000
and correct the DTEND-date to the day before to this:
DTSTART;TZID=GMT Standard Time:20150123
DTEND;TZID=GMT Standard Time:20150123
Now every thing will work fine.

Single Sign-on - PingfFederate - How to set the date?

I noticed when PingFederate(PF) sends the date it is off by a day from my Rails app. It appears that the PF date is the one off by a day. For example in the PF SAML response I get:
<saml:Assertion ID="pEaf1kce93SpAxfIpuohOv6QP-T" IssueInstant="2014-05-03T03:15:20.020Z" Version="2.0" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">
and
<saml:Conditions NotBefore="2014-05-03T03:10:20.021Z" NotOnOrAfter="2014-05-03T03:20:20.021Z">
whereas in Rails I get
Time.now = 2014-05-02 20:15:19 -0700
which makes me think that I need to set the date in PF. Note that PF is running on the same computer that the Rails app is running on.
Is there a way to set the date in PF?
The time is off as well. Is there a way in PF to set the time too?
SAML assertions are always in UTC. Which is what PingFed is using. Set your Rails application to use UTC as well.
I don't see why you think that the time is off. Your time from Rails is 2015 and -7. That means in UTC, it's tomorrow at 0315 - when it was issued. PingFed is setting an allowance of +/-5 minutes, so the SP should not accept it before 0310 or after 0320.
Your server and PingFed are correct so far...

error in showing outlook appointment time using php

I am pulling the appointments of user from outlook web access. Problem is Tuesday, October 08, 2013 2:30 PM-4:30 PM time is changed into 2013-10-08T08:45:00.000Z and 2013-10-08T10:45:00.000Z. What is the problem here? I want to show 2:30 PM.
For the purpose I am using 8068-PHP-Access-Microsoft-Exchange-Web-services-via-OWA-API
Any help/suggesstions are welcome.
It seems even though the time setting is correct when we pull the data the time setting is changed to GMT. So for the purpose I added the following code:
date_default_timezone_set("GMT");
$timestamp = strtotime("2013-10-08 08:45:00");
date_default_timezone_set("Asia/Kathmandu");
$utc_datetime = date("Y-m-d H:i:s", $timestamp);
echo $utc_datetime;

Retrieved JSON contains [0.0] randomly in the data

I've been retrieving json from my web service, with the data containing [0.0] in odd places, such as in the middle of "tit[0.0] le". I'm viewing the info in the console, so I just ignored it as when I actually use it it is not present.
However, I'm currently building a calendar and placing the retrieved events in it. The problem with a particular event is that the [0.0] seems to be lodged in between the timestamp 2012-03-[0.0] 01T00:00:00. It's only happening with this event that the [0.0] is not going away when I use it. Of course, the httpdateparser cant retrieve the date properly, with it interpreting it a day early. I think the [0.0] is the cause.
How do I get rid of the [0.0]? parse it out? I don't think it is actually there...
EDIT:
it looks like the [0.0] are just added by the blackberry console for viewing purposes.
But why is it only on the two events that are not working correctly?
full_date:2012-02-29T00:00:00
full_date:2012-03-01T00:00:00
Both these dates are parsed using the following:
Date date = new Date(HttpDateParser.parse(date_full));
c.setTime(date);
int theMonth = c.get(Calendar.MONTH);
int theYear = c.get(Calendar.YEAR);
int theDate = c.get(Calendar.DAY_OF_MONTH);
For theDate I get feb 28 and 29 respectively. Does this have to do with leap years? I thought Calendar delt with this stuff?
Check the list of valid date formats on the API. I found "yyyy-MM-ddThh:mm:ssTZD" (eg 1997-07-16T19:20:30+01:00) is on it. Maybe you need to append timezone information.
[EDITED]
Adjusting the date comes from web service to the device timezone may fix the problem. When calender.get(property) is invoked it considers device timezone.

Resources