Jump to content
UBot Underground

Recommended Posts

Hey Everyone,

 

I've got a new plugin for you, which will let you manipulate any kind of dates and/or times (even conversion from and to different culture/language).

 

Plugin will add a new function called "$datetime manipulation", and you'll find it under system functions.

 

 

For more information and download please visit http://ubotdev.com/free-plugin-datetime-manipualtion

 

Direct Download

 

 

Screenshot:

 

http://ubotdev.com/wp-content/uploads/2013/04/DATETIME-Manipulation.png

 

Examples of Usage - UBot Code Snippets:

 

Update v1.01:

Added a new function called "$datetime time span" that will convert an integer to time span string.

  • Like 5
Link to post
Share on other sites

Thanks guys for the support!

 

No problem for the free plugins, they are actually quite simple.

 

Yeah, I spent quite a while on researching the topic and preparing that page (actually more than on development), so hopefully you'll find it useful :)

Link to post
Share on other sites
  • 1 month later...

Help me with this little bit here, mate...

If I'm scraping dates in the following format:

30 MAY 2013
5 APR 2013
1 SEP 2012

 

etc...

 

How do I setup the plugin's function options properly, to transform that into a UBS type of date?
I keep getting errors, that the string input is not a recognized date, or some such wording...

Thanks in advance!
 

Link to post
Share on other sites

Here is the code:

set(#DATE, $plugin function("DateTime Manipulation.dll", "$datetime manipulation", "30 MAY 2013", "d MMM yyyy", "UBOT", "en-US", "en-US"), "Global")

Since input does not provide information about time, hour,min. and sec. will be set to 0.

  • Like 1
Link to post
Share on other sites

Thanks, mate... so you basically tell me I can just alter the preset filters from the Node View by editing the command in Code View and pasting there my format?

Link to post
Share on other sites

You can actually edit "Input Format" from Node View directllyl, just clear the content that is pre-filled and enter your own string.

 

When building "Input Format", you can refer to format specifiers here: http://ubotdev.com/free-plugin-datetime-manipualtion#custom-format-specifiers

 

Also, here is an example of custom formatting: http://ubotdev.com/free-plugin-datetime-manipualtion#convert-to-a-custom-date-time

  • Like 1
Link to post
Share on other sites

Worked perfectly, thank you!

I only had to change the format from

dd MMM YYYY

to
d MMM YYYY

to accommodate days numbered from 1 to 31.

Link to post
Share on other sites
  • 11 months later...

Thanks for the plugin, it's awesome, almost does what I need.  Trying to get the time in nanoseconds to create a nonce.

 

The API I'm connecting to, requires nonce's that are sequential.  My bot will be running several queries a second, so using the UNIX option isn't good enough for my application.

 

If you plan on updating this plugin, perhaps a way to get UNIX time returned in nanoseconds would be a request you could consider.

 

The Ubot Date variable doesn't offer nanoseconds, so not sure how you could pull that in from the system time (which does provide nanoseconds).

 

Thanks again, I'm sure I'll find it useful in other projects!

Link to post
Share on other sites

Thanks for the plugin, it's awesome, almost does what I need.  Trying to get the time in nanoseconds to create a nonce.

 

The API I'm connecting to, requires nonce's that are sequential.  My bot will be running several queries a second, so using the UNIX option isn't good enough for my application.

 

If you plan on updating this plugin, perhaps a way to get UNIX time returned in nanoseconds would be a request you could consider.

 

The Ubot Date variable doesn't offer nanoseconds, so not sure how you could pull that in from the system time (which does provide nanoseconds).

 

Thanks again, I'm sure I'll find it useful in other projects!

UNIX timestamp is defined in seconds, so if you want nanoseconds that's not a UNIX timestamp anymore.

 

I'm preparing a small update in the near feature, maybe I'll also look into more accurate counters.

Link to post
Share on other sites
  • 4 months later...

Thanks for the update!

 

Do you think this is possible http://screencast.com/t/dxYUIty2tRm for ubot UI monitor?

Check how the numbers increment. It looks like it's incrementing by miliseconds.

Hm...not sure what you mean... It confuses me because I see "Records Collected" number in the video, which I can't relate to time. Isn't that just a counter?

 

This new function is mostly meant to be used with UNIX timestamps...for example when you subtract one from another you get a time difference in seconds, which you can then convert with this new function to a more human-readable format - "time span".

Link to post
Share on other sites

Hm...not sure what you mean... It confuses me because I see "Records Collected" number in the video, which I can't relate to time. Isn't that just a counter?

 

This new function is mostly meant to be used with UNIX timestamps...for example when you subtract one from another you get a time difference in seconds, which you can then convert with this new function to a more human-readable format - "time span".

 

Hi,

 

Sorry for the confusion. I forgot that this plugin thread is dedicated for time management..

Anyway, do you think it is possible for ubot stat counter to behave the same? That we visually see it increment by milliseconds?

Link to post
Share on other sites

I don't think that's doable....1ms corresponds to a frequency of 1kHz, but your monitor is only able to refresh at rate of around 50-60Hz...as you can see the frequency of your monitor is much lower than what you are trying to display, so you actually wouldn't saw all the changes if you update at that rate. From the frequency of your monitor you can calculate what the max rate is; for 60Hz it's for example 16,67ms (this is the min. increment that you would be able to spot). You should also keep in mind that your eye only catches changes which happen around 25Hz.

 

Else I was already adding a stopwatch to this plugin (which supports miliseconds), but since Kev123 released that as a standalone plugin I've removed that feature for now. However, you should also know that that stopwatch is running in the background all the time, so it will be more CPU consuming (although I don't think the difference is huge)...

 

Hope this helps.

Link to post
Share on other sites

I don't think that's doable....1ms corresponds to a frequency of 1kHz, but your monitor is only able to refresh at rate of around 50-60Hz...as you can see the frequency of your monitor is much lower than what you are trying to display, so you actually wouldn't saw all the changes if you update at that rate. From the frequency of your monitor you can calculate what the max rate is; for 60Hz it's for example 16,67ms (this is the min. increment that you would be able to spot). You should also keep in mind that your eye only catches changes which happen around 25Hz.

 

Else I was already adding a stopwatch to this plugin (which supports miliseconds), but since Kev123 released that as a standalone plugin I've removed that feature for now. However, you should also know that that stopwatch is running in the background all the time, so it will be more CPU consuming (although I don't think the difference is huge)...

 

Hope this helps.

 

Alright, thanks for the detailed response.

Not a big deal. I just want to make a cool effect like on the video. :)

Link to post
Share on other sites

Is it possible to add in the option to get the date and time in ISO 8601 formats? http://www.w3.org/TR/NOTE-datetime

 

 

What I am needing is complete date plus hours, minutes, seconds, decimal fraction of a second and time zone offset of "+hh:mm"
YYYY-MM-DDThh:mm:ss.sTZD
(eg)
 
  • 2014-08-05T13:46:02.06+01:00
  • 2014-09-15T19:22:33.45-06:00
Edited by Pete_UK
Link to post
Share on other sites

I don't think you understand...as I said, you should use custom format specifiers instead of using a a value from the dropdown.

 

I'll quote the paragraph form my website for you here: 

 

 

If standard date/time formats from drop-down won’t suit you, you can also specify a custom format using format specifiers, which will allow you to format input/output date/time in any way you like. 

 

As said in previous post, you can find more info about custom format specifiers here: http://ubotdev.com/free-plugin-datetime-manipualtion#custom-format-specifiers

Link to post
Share on other sites

Got it.

 

I now see all the options available for custom formatting. I didn't realise the drop-downs on that page were active. I though it was a screen shot!

 

Thanks, and sorry for being a dumb-ass :D

Link to post
Share on other sites

.cs files for visual studio created already.

 

Can you add these into your plugin for expanded functionality.   Adds 16 or 17 functions i think

http://www.botguru.net/time.zip

 

NOTE THIS IS NOT A PLUGIN.  This is for the OP to add to his plugin.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...