Looking for the Date.. Time and Place Script

Post new topic   Reply to topic Scripting Questions View previous topic :: View next topic  
Author Message
Benji



Joined: 11 Jul 2006
Posts: 27
Location: West Virginia

PostPosted: Wed Feb 23, 2011 1:13 am    Post subject: Looking for the Date.. Time and Place Script Reply with quote

Can anyone help me with the script you put on the gate that annouces your country , time,, date.. when you arrive on the Gate..


Thanks.. Benji
Back to top
Cheiron



Joined: 21 Apr 2005
Posts: 388
Location: Copenhagen, Denmark

PostPosted: Sat Mar 05, 2011 2:30 am    Post subject: Reply with quote

This will tell you username, time and date, time being local timezone for entering user. It won't tell you what country though, but with an IP-checker and checking serverlog you can see that.
I seem to remember somebody made a script that showed country, but hmm... can't remember how.


Code:
import manor
import time

def checkIn(Dummy):
    myName = manor.getUserName(manor.myID())
    entertime = time.localtime
    entertime = time.strftime("%x, %X")
    Message =  "I entered on "
    Message = Message + entertime
    manor.say("'page " + Message)
    return

def mnr_enter(userID):
    if userID == manor.myID():
        manor.setTimer(manor.tickcount() + 60,  checkIn, 0)
    return


I hope that helps.
_________________
Cheiron
______________________________
"Any scientist with respect for himself should start
the day by rejecting his own pet hypotheses".
(Konrad Lorenz)

"Wir müssen wissen
Wir werden wissen"
(David Hilbert)
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Benji



Joined: 11 Jul 2006
Posts: 27
Location: West Virginia

PostPosted: Sat Mar 05, 2011 5:16 pm    Post subject: Reply with quote

Thank you Cheiron,,, I am going to try it..


Thanks again.. Benji
Back to top
Benji



Joined: 11 Jul 2006
Posts: 27
Location: West Virginia

PostPosted: Sat Mar 05, 2011 5:41 pm    Post subject: Reply with quote

Che I put it in.. it dont give timezone maybe you can help me here is what it shows.. beside name : I entered on Saturday March 05 2011,
18:39:26 : shows time but not timezone
This is it... Maybe you cant help me out some..

Thanks
Back to top
Cheiron



Joined: 21 Apr 2005
Posts: 388
Location: Copenhagen, Denmark

PostPosted: Sat Mar 05, 2011 10:17 pm    Post subject: Reply with quote

It shows local time for USER entering, it doesn't state the timezone.
Here is me logging into AF:

Page from Cheiron: I entered on Sunday
March 06 2011, 04:56:07


You can deduce, compared to your own timezone, where I am then.

So, just for clarity... you know you are say in EST timezone... that is GMT - 5 (Greenwich Mean Time minus 5 hours), and the clock says 11 pm saturday to you... so, my login says it's 5 am sunday... that's 6 hours difference that I'm ahead of you, hence I'm in GMT + 1 .... also known as CET (Central European Timezone)

The real fun begins with daylight saving time, which is not standardized world wide lol... well it's a help anyway.

Btw.. here is a neat interactive map of it all:

http://www.worldtimezone.com/standard.html
_________________
Cheiron
______________________________
"Any scientist with respect for himself should start
the day by rejecting his own pet hypotheses".
(Konrad Lorenz)

"Wir müssen wissen
Wir werden wissen"
(David Hilbert)
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic All times are GMT - 6 Hours
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum