Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Not exactly a question more a gotcha. So I was using skybrud social and getting twitter stats the last time i used the app was around February and all was working fine.
I was processing around 500 accounts and was batching them using the X-Rate-Limit-Reset returned from twitter via Reset data send from skybrud api. So when i got close to limit i would thread sleep for 13mins.
I recently ran the app again but this time my reset date - datetime.now was always a negative value. I found that the date coming back from twitter was not taking into account UK daylight saving time. Its April and in the UK we are not in summer time, so i have had to add 1 hr to the reset date and now all is working again. There are 2 problems in software working with dates and invalidating cache :-}
Hi Ismail and thanks for reporting,
As far as I remember, the reset date is specified as UTC, so the date you check it against should also be UTC - eg. DateTime.UtcNow.
Please let me know whether this works ;)
Doh, i was doing:
var resetDate = rate.Reset;
var now = DateTime.Now;
Have updated to as you suggest DateTime.UtcNow all works nicely.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted