| View previous topic :: View next topic |
| Author |
Message |
HVR Voice
Joined: 10 Dec 2009 Posts: 6
|
Posted: Thu Dec 10, 2009 5:23 pm Post subject: Can this be done ? |
|
|
I would like to know if it would be possible to have a time script which only gives the time in Eastern standard time.
Something like:
HVR !est
[bot] It is now 4:23 P.M. E.S.T.
I would be grateful for any help with this. |
|
| Back to top |
|
 |
TCL_no_TK Owner

Joined: 25 Aug 2006 Posts: 509 Location: England, Yorkshire
|
Posted: Thu Dec 10, 2009 10:22 pm Post subject: |
|
|
Assuming the bot is running on UTC (+0000) time | Code: | bind pub -|- !est pub:est
proc pub:est {nick host hand chan text} {
puthelp "PRIVMSG $chan :It is now [clock format [clock scan "5 hours ago"] -format "%H:%M %p"] E.S.T"
} |  _________________ TCL the misunderstood |
|
| Back to top |
|
 |
HVR Voice
Joined: 10 Dec 2009 Posts: 6
|
Posted: Thu Dec 10, 2009 10:46 pm Post subject: |
|
|
thank you very much for coding this
the bot is running on GMT -6 I believe
installed and have the following result:
[21:39] <Burke> !est
[21:39] <RadioChick> It is now 15:39 PM E.S.T
My questions now would be, what do I change to get the time moved ahead 6 hours, and, how do I get it to display in regular time, not 24 hour format ? |
|
| Back to top |
|
 |
TCL_no_TK Owner

Joined: 25 Aug 2006 Posts: 509 Location: England, Yorkshire
|
Posted: Fri Dec 11, 2009 3:45 pm Post subject: |
|
|
EST is 5 hours behind UTC/GTM, so we would need to use | Code: | bind pub -|- !est pub:est
proc pub:est {nick host hand chan text} {
puthelp "PRIVMSG $chan :It is now [clock format [clock scan "1 hour"] -format "%I:%M %p"] E.S.T"
} | and we use %I not %H if you want it in 12 hours not 24 hours.
Eggdrop goes off the shell's time, but i belive there is a patch to fix this available from the files page on the main website. But the settings are in eggdrop.conf file  _________________ TCL the misunderstood |
|
| Back to top |
|
 |
HVR Voice
Joined: 10 Dec 2009 Posts: 6
|
Posted: Sat Dec 12, 2009 2:29 pm Post subject: |
|
|
very cool !!!!!
thank you so much !!!!!!!!!!! |
|
| Back to top |
|
 |
|