egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Timezone problem

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Eggdrop Help
View previous topic :: View next topic  
Author Message
wac
Halfop


Joined: 10 Dec 2006
Posts: 80
Location: in my cardboard box

PostPosted: Sun Dec 10, 2006 1:26 am    Post subject: Timezone problem Reply with quote

I have shell on a freebsd machine located somewhere other than my current timezone and for the life of me i cannot get it to log the correct time.

at first i tried this
set timezone "EST"
set offset "-5"
set env(TZ) "$timezone $offset"

and now this just to try to get some other random timezone
set timezone "UTC"
set offset "-6"
set env(TZ) "$timezone $offset"

but neither have worked thus far, im using 1.6.18 and have searched all over the place but havnt found anything, any help would be greatly appreciated

^wAc^

p.s. i am currently in the eastern timezone
_________________
I see j00!


Last edited by wac on Thu Aug 30, 2007 12:29 am; edited 1 time in total
Back to top
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Sun Dec 10, 2006 4:17 am    Post subject: Reply with quote

Which shell are you using? bash? csh? zsh? each shell has a different way of setting timezone afaik. Also, timezone is usually a variable recognized by applications (I just checked the entire bash manpage for any timezone relevant variables, and found none, so apparently bash only cares about the system time, but you can also use strftime to set your prompt for a specific locale, for example.) Did a quick check of eggdrop's docs and don't see any timezone related env. vars listed there either..

A quick google search for 'freebsd timezone' brought up:

http://dannyman.toldme.com/2004/11/01/freebsd-user-timezone/

might be helpful to you.
Back to top
View user's profile Send private message
wac
Halfop


Joined: 10 Dec 2006
Posts: 80
Location: in my cardboard box

PostPosted: Sun Dec 10, 2006 4:24 am    Post subject: Reply with quote

i use bash and i got this when i ran tzsetup

│Could not open /etc/localtime: Permission denied

also i guess i forgot to mention that i do not have root and i already asked them if they could change the timezone for my shell only but they said that the change would be system wide and they wouldnt do it for me
_________________
I see j00!


Last edited by wac on Thu Aug 30, 2007 12:30 am; edited 1 time in total
Back to top
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Sun Dec 10, 2006 4:24 am    Post subject: Reply with quote

Duh, I should've looked at my eggdrop.conf:

set timezone "EST"
set offset "5"

# This setting defines the timezone is your bot in. It's used for internal
# routines as well as for logfile timestamping and scripting purposes.
# The timezone string specifies the name of the timezone and must be three
# or more alphabetic characters. For example, Central European Time(UTC+1)
# should be "CET".
set timezone "EST"

# The offset setting specifies the time value to be added to the local
# time to get Coordinated Universal Time (UTC aka GMT). The offset is
# positive if the local timezone is west of the Prime Meridian and
# negative if it is east. The value (in hours) must be between -23 and
# 23. For example, if the timezone is UTC+1, the offset is -1.
set offset "5"

# If you don't want to use the timezone setting for scripting purposes only,
# but instead everywhere possible, un-comment the following line.
#set env(TZ) "$timezone $offset"
Back to top
View user's profile Send private message
wac
Halfop


Joined: 10 Dec 2006
Posts: 80
Location: in my cardboard box

PostPosted: Sun Dec 10, 2006 4:32 am    Post subject: Reply with quote

well [censored] it worked i guess its just because i was doing -5 instead of 5 thanks, hehe now i feel kinda stupid...
_________________
I see j00!


Last edited by wac on Thu Aug 30, 2007 12:29 am; edited 1 time in total
Back to top
View user's profile Send private message
Ace-T
Halfop


Joined: 29 Aug 2006
Posts: 82

PostPosted: Mon May 28, 2007 6:59 am    Post subject: Reply with quote

came in handy, thx Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Eggdrop Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
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


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber