[twitter-dev] Re: How to calculate time remaining for rate limit

2009-07-02 Thread Matt Sanford
Hello there, The reset-time-in-seconds is a the UNIX time (a.k.a Epoch time, number of seconds since 1970-01-01 UTC) at which the rate limit will reset. Thanks; – Matt Sanford / @mzsanford Twitter Dev On Jul 2, 2009, at 1:05 PM, danksoft wrote: Hi, I'm creating a small app

[twitter-dev] Re: How to calculate time remaining for rate limit

2009-07-02 Thread danksoft
So I would just get the UTC time convert it to a date and find the difference in time between UTC time and time now? On Jul 2, 1:33 pm, Matt Sanford m...@twitter.com wrote: Hello there,      The reset-time-in-seconds is a the UNIX time (a.k.a Epoch time,   number of seconds since 1970-01-01

[twitter-dev] Re: How to calculate time remaining for rate limit

2009-07-02 Thread Matt Sanford
Yup. In all likelihood your programming language or environment already has a function for getting the current epoch time and you can just subtract the two to find out the number of seconds remaining. — Matt On Jul 2, 2009, at 2:10 PM, danksoft wrote: So I would just get the UTC time

[twitter-dev] Re: How to calculate time remaining for rate limit

2009-07-02 Thread JDG
Are you sure that your current time is not returning local time instead of UTC time? If you're in PDT, that would make sense. On Thu, Jul 2, 2009 at 16:42, danksoft danks...@gmail.com wrote: Ok, the difference I'm getting is still 8 hours... 7/2/2009 11:41:23 PM(epoch time) : 7/2/2009

[twitter-dev] Re: How to calculate time remaining for rate limit

2009-07-02 Thread JDG
Obviously, that will only work in your time zone. What language are you using? Most have a way to get the current time in UTC time as opposed to local time. On Thu, Jul 2, 2009 at 16:54, danksoft danks...@gmail.com wrote: Wow I feel stupid lol. I noticed I have to subtract 8 hours from it.

[twitter-dev] Re: How to calculate time remaining for rate limit

2009-07-02 Thread JDG
My VB is very rusty, but can you use DateTime.UtcNow instead of Now? On Thu, Jul 2, 2009 at 17:21, danksoft danks...@gmail.com wrote: I'm using VB6, heres my code in case you know it... Dim iSec As Long Dim iNow As Long iSec = Parsed time from XML iNow = DateDiff(s, #1/1/1970#, Now,

[twitter-dev] Re: How to calculate time remaining for rate limit

2009-07-02 Thread JDG
Actually, I think that might be specific to VB.NET and I just read you're using 6. I think that you can use the GetSystemTime API call[1] to do the same thing in VB6. [1] http://www.ex-designz.net/apidetail.asp?api_id=145 On Thu, Jul 2, 2009 at 17:31, JDG ghil...@gmail.com wrote: My VB is very

[twitter-dev] Re: How to calculate time remaining for rate limit

2009-07-02 Thread danksoft
JDG, any way I can talk to you via AIM or Skype? On Jul 2, 4:34 pm, JDG ghil...@gmail.com wrote: Actually, I think that might be specific to VB.NET and I just read you're using 6. I think that you can use the GetSystemTime API call[1] to do the same thing in VB6.