!followage command question

So, I’ve got this command for a user to find how long they’ve been following:

!addcom !followage -cd=5 $(urlfetch https://api.rtainc.co/twitch/channels/$(channel)/followers/$(touser)?format=[1]+followed+[2]+ago) ($(urlfetch https://2g.be/twitch/following.php?user=$(touser)&channel=$(channel)&format=m/d/Y%20-%20h:i%20a&notext))

which outputs this:

[user] followed 7 months, 3 weeks ago ( 06/30/2016 - 07:02 pm)

My problem is that the time is way off. I don’t know what time zone the time is in. Many outputs of this command have users following very early in the morning (which i doubt that many people did).

Is there any way to make the time in, say, eastern standard time?

Heya, the default format is UTC, however if you would like to change that you can add the timezone parameter:
...&format=m/d/Y%20-%20h:i%20a&notext&timezone=America/New_York

Supported timezones here, let me know if this fixes your issue.

It worked like a charm. Thank you!

One more thing. Is there any way to specify that the time is in EST?

Yeah, you can add the timezone in the format, it should be capital T:
&format=m/d/Y - h:i a T

For more info check here, en scroll down to Timezone.

Hi @xgerhard i am having a hard time to convert UTC to EST. here is what i have set up

$(urlfetch https://2g.be/twitch/following.phpU user=$(touser)&channel=$(channel)&format=&format=m/d/Y - h:i a T)) which shows this

Nightbot : Viewer has been following Channel since 03/04/2017 - 03:06 am UTC)

How can i get the UTC part to display EST?

Thanks, -masutto

Heya, you can add a timezone to the url: &timezone=America/New_York or choose a timezone from this list.

@xgerhard cool! just to make sure i do this right? can you provide me an example of what to type?

like this?

$(urlfetch https://2g.be/twitch/following.php&timezone=America/New_York U1user=$(touser)&channel=$(channel)&format=&format=m/d/Y - h:i a T))

thanks -masutto

Sure, like this:
$(urlfetch https://2g.be/twitch/following.php?user=$(touser)&channel=$(channel)&format=m/d/Y - h:i a T&timezone=America/New_York)

oh how cool! thanks so much for replying back fast! i have one more question before i conclude. this is what i have so far… what i am looking to do is on the 1st string delete the hours,min,sec part so i would just show the year(s), month(s), week(s), and day(s) followed. also at the 2nd string i only want just the date and time that user has followed.

$(urlfetch https://2g.be/twitch/following.php?user=$(touser)&channel=$(channel)&format=mwdhms) ($(urlfetch https://2g.be/twitch/following.php?user=$(touser)&channel=$(channel)&format=m/d/Y - h:i a T&timezone=America/New_York))

this is current as of this post

[user] has been following [channel] for 8 months, 3 weeks, 5 days, 20 hours, 14 minutes, 8 seconds ([user] has been following [channel] since 06/07/2016 - 06:12 pm EDT)

this is what i would like to see
[user] has been following [channel] for 8 months, 3 weeks, 5 days. (06/07/2016 - 06:12 pm EDT)

how would you write that code out? i’m so lost lol!

thanks -masutto

Then you’re almost there, your first point, I dont have a solution for it that countdown format is how it is.
For your second point simply add &notext at the end of the second urlfetch: ...&timezone=America/New_York&notext))...

oh ok thanks so much for all your help :slight_smile:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.