Setting a PM Time in CloudKit Dasboard - cloudkit

I am using the new CloudKit Dashboard to add to my public database. I can't seem to set a time that is PM anymore.
I am trying to enter a date 9/1/2017 8 pm and it always converts it to 8 AM.
I've tried:
09/01/2017 20:00:00
9/1/17 20:00:00
09/01/2017 08:00 PM
9/1/17 08:00 PM
09/01/2017 08:00 PM
Every single time when I hit save it changes the display time to:
9/1/2017 8:00:00
Which is 12 hours off. I thought maybe it was just a display issue but it's calculating in my app as 8am as well.
Is this a bug or am I doing something wrong? It used to work to use military time.

I was having the same issue with the new dashboard. I reached out to Apple Developer support yesterday, via email, and described what was happening.
We've only had our first email volley, so I haven't heard back about them closing (officially) the ticket, but I'm happy to report the date/time field appears to be fixed, I'm able to enter pm times without the value changing on save. Try it.

Related

Convert from wrong unix time stamp to correct

I've inherited a problem. A front end calendar application that I have to update is treating every event as being in unix time. No matter what timezone the calendar is meant to be displayed in.
Our DB saves every event as unix time.
The calendar will assume that if I create an event at 7:00 PM it is 7:00 PM UTC. How would I go about converting this from 7:00 PM UTC to 7:00 PM [selected timezone] so that when it gets to the DB it'll be saved in the proper unix time stamp.
Tools available: Moment (with timezone), jquery.

UNIX Timestamp or something else?

I have a field containing what should be a UNIX time stamp. As an example one value is 1408675380
Now when I do various online conversions, it shows the right day (22nd August) but shows the incorrect time. It should be around 21:00 or so but instead shows 02:43:00 GMT
Likewise, 1408676520 shows the correct day (22nd August) but instead of showing a time of around 22:00/23:00 it shows 03:02:00 GMT
I have no control over the data at all - just wondering if there's something obvious I'm missing?
1408849260 - Sunday, August 24th 2014, 03:01:00 (GMT) - Correct day, around 18 hours too early
1408850640 - Sunday, August 24th 2014, 03:24:00 (GMT) - Correct day, around 18 hours too early
Thanks,
JJ
Is your data in some other timezone than GMT ? something like GMT-5 (america west cost maybe ?)

Mongodb date is off by 1 hour

I am running mongodb on ubuntu server. The server time is
root# date
Thu Sep 13 21:15:58 BST 2012
But when I run the following command I get a different result
root# mongo
MongoDB shell version: 2.2.0
connecting to: test
> new Date()
ISODate("2012-09-13T20:15:58.670Z")
There is exactly one hour difference. When I update a documents updated_on field with php using MongoDate(), the value of the field is still 1 hour off.
[EDIT]
Actually I just checked my php error log and the time in the log file is 1 hour off as well
[13-Sep-2012 20:11:14 UTC] Log Message (Time should be 21:11:14)
Mongo tells you
2012-09-13T20:15:58.670Z
Z = Zulu time / Zero offset / UTC. You can also express the time in that TZ as 2012-09-13T20:15:58.670+00:00, as defined in the ISO8601 standard by the way.
BST is UTC+1. So, they are the same time but in different time zones.
You can resolve this issue by displaying the DateTime with ToLocalTime method.
MVC C# Example: #Model.StartDate.ToLocalTime()
This is due to the way MongoDB store datetime in BST format. So the daylight savings time or the time zone of the server will have an effect on the actual date time returned to the application. This simple code will be able to format as usual with ToString("dd MMMM yyyy hh:mm tt") or any other format based on your requirements.
Here you need to understand a concept in time setting in clocks called daylight saving time. In some countries around the world the clock is advanced by 1 or more hours to experience day light by one more hour. The difference between IST and GST is 5.30 hrs but the actual time difference is between New Delhi and London time is 6.30 hrs. See this article from 4GuysFromRolla for setting and using server time.
On windows change your timezone.
Controll Panel -> Date and Time -> Change on timezone -> (UTC) Coordinated universal time.
And then just change your time

facebook api date format

I've been working on facebook application. But I've faced with strange bug(?).
It I'm trying to get detailed info about any event using graph api start_date differs from the one if I'm trying to get it using fql. for example:
https://graph.facebook.com/209798352393506/ - start date is 2011-05-26T19:00:00
https://api.facebook.com/method/fql.query?query=select%20eid%2C%20name%2C%20tagline%2C%20pic%2C%20host%20%2C%20start_time%20from%20event%20where%20eid%20%3D209798352393506 - start time is 1306461600. Which in human readable format equals to Fri, 27 May 2011 02:00:00 GMT.
As you can see difference between got dates is 5 hours. Somtimes I'm getting dates which differ for 8 hours, sometimes - 6.
Correct date is the first one:
http://www.facebook.com/events/209798352393506/
I can't figure out what happens. All events I'm trying to view are from Denmark. My timezone is Europe/Kiev. Difference is 1 hour.
Is this a facebook's bug? Or documented feature? Or am I doing something wrong?
Link to the documentation or another answer in stackoverflow would be enough.
Here is two events
http://www.facebook.com/events/290600150977115/ - starts on 2012-03-22 at 20:00
http://www.facebook.com/events/289501924395338/ - starts on 2012-03-03 at 21:00
But. Using FQL I'm getting that first event starts on 2012-03-23 at 04:00. Difference is 8 hours. And the second one starts on 2012-03-04 at 06:00. In this case difference is 9 hours. Why???
It was because of daylight saving time.
Time difference between me and facebook(Los Angeles) sometimes was 8 sometimes 9 hours, because there was a moment when Denmakr alredy changed their time to summer time and los angeles - not.
The problem occured when event started "in winter time" and finished in summer time. In this case I needed to add one hour.
Facebook is weird.
From /fql/insights/
The end of the period during which the metrics were collected, expressed as a unix time (which should always be midnight, Pacific Daylight Time) or using the function end_time_date() which takes a date string in 'YYYY-MM-DD' format.
2011-05-26T19:00:00 ===> 2011-05-26T19:00:00 PDT ===> Fri, 27 May 2011 02:00:00 GMT.

Time stamp issue while adding event in facebook using graph API

What is the valid format for start_time and end_time while adding an event using graph api ...
i tried adding an event using unix time stamp .. however its not showing the same date when the event is published ..
when i give start_time as 1293802200 which is 31st Dec 2010 07:00 pm .. it shows as 31st Dec 5:30am on facebook ..
what is it that am doing wrong .. do i need to consider time zone issues as well ??
Regards
Abhishek Jain
According to http://developers.facebook.com/docs/reference/api/event/ it seems that you need to specify date in the Pacific time zone (PST).
Now, the timestamp value you provided is 31st Dec 2010 19:00 in India indeed which corresponds to same day, 5:30 in Pacific time.
In conclusion, convert your local time to Pacific time (PST) prior to uploading it to Facebook.