[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 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. > > [1]http://www.ex-designz.net/apidetail.a

[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 wrote: > My VB is very rusty, but can y

[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 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, vbUseSystemDa

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

2009-07-02 Thread danksoft
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, vbUseSystemDayOfWeek, vbUseSystem) So then I do iSec - iNow which gives me 12:00 but that still isn't right... On Jul 2, 3:57 pm, JDG wrote:

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

2009-07-02 Thread danksoft
Ok ok so I take the UTC time via XML and then my current epoch time and subtract the two then just format h:nn? On Jul 2, 3:56 pm, JDG wrote: > 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,

[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 wrote: > > Wow I feel stupid lol. I noticed I have to subtract 8 hours from it. > > On Jul 2, 3:42 p

[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 wrote: > > Ok, the difference I'm getting is still 8 hours... > > 7/2/2009 11:41:23 PM(epoch time) : 7/2/2009 3:40:56 PM(current

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

2009-07-02 Thread danksoft
Wow I feel stupid lol. I noticed I have to subtract 8 hours from it. On Jul 2, 3:42 pm, danksoft wrote: > Ok, the difference I'm getting is still 8 hours... > > 7/2/2009 11:41:23 PM(epoch time) : 7/2/2009 3:40:56 PM(current time) > > Am I still doing something wrong? > > On Jul 2, 2:19 pm, Matt

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

2009-07-02 Thread danksoft
Ok, the difference I'm getting is still 8 hours... 7/2/2009 11:41:23 PM(epoch time) : 7/2/2009 3:40:56 PM(current time) Am I still doing something wrong? On Jul 2, 2:19 pm, Matt Sanford wrote: > Yup. In all likelihood your programming language or environment   > already has a function for gett

[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 co

[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 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 UTC) at which

[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 li