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 <ghil...@gmail.com> 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, 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 3:40:56 PM(current time)
>
> > Am I still doing something wrong?
>
> > On Jul 2, 2:19 pm, Matt Sanford <m...@twitter.com> wrote:
> > > 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 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 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 like TweetDeck and was wondering how to
> > > >>> calculate the correct time when your rate limits reset...
>
> > > >>> The XML I parsed is:
> > > >>> <reset-time-in-seconds type="integer">1246568101</reset-time-in-
> > > >>> seconds>
>
> > > >>> So in order to convert seconds to minutes you do seconds
> > > >>> 0.0166666666666667 * 1246568101
> > > >>> Therefore, 1246568101 seconds = 20776135.016666666 minutes
>
> > > >>> Which is not right if limits are reset every 60 mins.
>
> --
> Internets. Serious business.

Reply via email to