Unable to add scrobbles to LastFM with a timestamp in the past - last.fm

When adding a scrobble to LastFM using the track.scrobble API, a track name, artist and timestamp are provided.
When the timestamp is set to 1592238683 (June 15th, 2020), the API returns <ignoredMessage code="1"/> which corresponds to "Artist was ignored"
When the timestamp is set to the current time 1671625968, the same scrobble is added.
The same error is seen for any timestamp more than 1 month old.
Is this an undocumented limitation of the LastFM API? Is it not possible to insert scrobbles which happened far in the past? Is there any workaround to achieve this?

According to this forum post, from 2008/09/08, scrobbles older than 14 days are not accepted by last.fm.
http://web.archive.org/web/20140811012854/https://www.last.fm/forum/21713/_/455659/1
You could work around this issue by posting your scrobbles as having occurred more recently, but there isn't a way to insert your scrobbles at the appropriate time without them having occurred within the past 2 weeks.

Related

Why is Time not setting when inserting new task using Task Service?

I am trying to insert new task with due date and time in Google Tasks using Tasks Service. The issue i am facing is that date is setting correctly while time is not setting. The code is given below:
I had tried all the solutions given on stackoverflow and other platform, none of them worked.
var task = Tasks.newTask().setTitle(data[i]);
task.setDue("2019-6-25T10:10:10.000Z");
Tasks.Tasks.insert(task, taskList.id);
I expect both the date and time to be set but only date is setting.
The official document says as follows.
Due date of the task (as a RFC 3339 timestamp). Optional. The due date only records date information; the time portion of the timestamp is discarded when setting the due date. It isn't possible to read or write the time that a task is due via the API.
Unfortunately, in the current stage, by above specification, even if 2019-6-25T10:10:10.000Z is used for due, it becomes 2019-06-25T00:00:00.000Z. So it seems that in order to modify the time, it is required to manually modify it.
Reference:
Resource representations of Tasks

getOffice365ActivationsUserDetail Graph API returns UnknownTenantId

I am trying to get the information about the users that have Activated Office 365 using:
/beta/reports/getOffice365ActivationsUserDetail?$format=text/csv
I am getting an error:
{
"code": "UnknownTenantId",
"message": "We do not recognize this tenant ID {MyTenantID}. Please double-check the tenant ID and try again."
}
The Read.Report.All permission is already assigned, and I am able to get other information from O365 using the Graph API.
Any suggestions how to resolve this issue?
You shouldn't be using the /beta/ release as this report is available in /v1.0/ and returns test/csv by default.
You also need to provide a valid period to the getOffice365ActiveUserDetail endpoint:
Specifies the length of time over which the report is aggregated. The supported values for {period_value} are: D7, D30, D90, and D180. These values follow the format Dn where n represents the number of days over which the report is aggregated.
For example, to get details for users active in past 7 days you would request:
https://graph.microsoft.com/v1.0/reports/getOffice365ActiveUserDetail(period='D7')

Trying to use the actual 'day of the week' to show api data in react native

This is my first post here at StackOverflow.
I've tried to search the internet for a while now, but probably because i don't now what to search exactly I can't find the answer online.
I have done a react-native beginners tutorial on how to make an api call and list the results in a flatlist. Everything is working fine, but when I try to add another field that show's the opening hours of that particular day it only works when I hardcode it like this:
<Text style={styles.hours}
numberOfLines={1}>{item.day5}</Text>
This correctly shows the opening hours of Friday, provided by the api. What I would likt though, is to show the opening hours of the actual day of today.
I already managed to calculate the day number and show it in the console by:
let date = new Date();
let dow = date.getDay();
console.log( 'The day is ', dow );
This returns the correct day number. I'm sure it is probably something really simple but I still can't figure out how to use this day number to actually show the current day's opening hours.
Anyone here who can help me out?
Regards, Jelle

Inconsistent time difference in facebook post graph API

Recently, i'm making an application which retrieve facebook posts of a page for a certain date. The issue that i've encountered is, there are some inconsistencies between the post unix time and the displayed date for some posts.
This is an example that i've found:
Created time from JSON reponse : "created_time": "2013-03-09T18:58:20+0000"
Displayed date :March 10, 2013 at 1:58am
The time difference is : 1:58 am - 18: 58 pm = 7 hr
then, for another post:
Created time from JSON reponse : "created_time": "2013-03-09T19:03:17+0000"
Displayed date :March 10, 2013 at 3:03am
The time difference is : 3:03 am - 19: 03 pm = 8 hr
And no, I didn't change my timezone inbetween displaying those two JSON response.
I use graph API and 'since until' parameter with unix timestamp for getting the JSON response.
Is there anyone who can explain this issue?
Thanks in advance! :)
After much more time spending on it..i found this helpful link to implement in my project...
i hope it may helpful to u also..
How to convert Date from facebook api into android app date format

calendarApp createEvent added event on wrong day

Here is my code:
function calEvent(){
var arrivalDate = "06/10/2013";
var departureDate = "06/18/2013";
var start = new Date(arrivalDate);
var end = new Date(departureDate);
var cal = CalendarApp.getCalendarById('id487g3esn088a00omqa99ugv0#group.calendar.google.com');
cal.createEvent('Apollo 11 Landing',start,end);
}
When I run this it will create the event in the correct calendar however it will only be from June 10 thru June 17. I need the event to cover June 10 - June 18.
I have checked the Timezone setting and the spreadsheet, script and calendar are all on the same time zone (Mountain Time GMT-7)
How can I get this seemingly simple code to set the event on the correct dates? I've tried several date formatting (utilities.formatDate) but can't seem to get the correct format.
Thanks in advance.
How to use timeZone of calendar to set timeZone for date object
I posed the above question a couple a weeks ago, and came up with a working solution. Not sure if it is the best or not, but you can look over and see if it helps. In working on a solution for my question I noticed several things. The script definitely uses the script timezone to create a date object. But when it post to a calendar it adjust the date to executors default calendar timezone not the timezone of the calendar you're writing too. So if a user's default calendar timezone is different from the calendar being written to you will get all kind of crazy time's
So the function gasTimezoneOffset() that is listed in the above question was my solution for this.
Hope this helps.