error in showing outlook appointment time using php - outlook-2007

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;

Related

Windowing and Watermark in Apache beam : Google dataflow

I have a fixed window of 1 minute. I am considering event time.
beam.WindowInto(window.FixedWindows(300))
When I deploy this code ,is the window created instantly even if I have not published any message .suppose I deployed at 6:30 , is it like the windows are automatically created as 6:30 to 6:35, 6:35 to 6:40 and so on ?
If I publish a message to topic having
event timestamp = 6:31 (unix seconds i.e 10,176589653)
when system time = 6:36
..does it mean the watermark for that specific message is at 6:31 and it will miss the window as system time is at 6:36 and allowed lateness=0 and will be rejected.
Windows are always created using UNIX time 0 as a base, meaning, no matter if you start the pipeline at 6:31, 6:32 or 6:35, the windows would always be [6:30, 6:35), [6:35, 6:40).... Note that this also applies for days, the windows would start at 00:00 UTC.
If you want to change this, there's an offset parameter.

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...

php 5.2.17 date('T') gives incorrect timezone. Server time+phpinfo time are correct

I am having a bit of a weird issue:
the date function gives timezone=MST
the date function from the centOS prompt gives me EST
the phpinfo() function returns America/New_York
As Plesk was showing America/New_York but centOS was not, Techsupport did something to the
/usr/share/zoneinfo/ files, because they said that somehow the New_York file was showing MST (Mountain Time).
After that operation, centOS time and phpinfo() display EST correctly but the date function still display MST.
Any ideas?
Did you tried date_default_timezone_set()?
Since PHP 5.1.0 (when the date/time functions were rewritten), every call to a date/time function will generate a E_NOTICE if the timezone isn't valid, and/or a E_WARNING message if using the system settings or the TZ environment variable.

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.

ICS timezone not working

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.

Resources