This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Timezone problem

General support and discussion of Eggdrop bots.
Post Reply
User avatar
wac
Halfop
Posts: 80
Joined: Sun Dec 10, 2006 1:22 am
Location: in my cardboard box

Timezone problem

Post by wac »

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
Last edited by wac on Thu Aug 30, 2007 12:29 am, edited 1 time in total.
I see j00!
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

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/f ... -timezone/

might be helpful to you.
User avatar
wac
Halfop
Posts: 80
Joined: Sun Dec 10, 2006 1:22 am
Location: in my cardboard box

Post by wac »

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
Last edited by wac on Thu Aug 30, 2007 12:30 am, edited 1 time in total.
I see j00!
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

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"
User avatar
wac
Halfop
Posts: 80
Joined: Sun Dec 10, 2006 1:22 am
Location: in my cardboard box

Post by wac »

well [censored] it worked i guess its just because i was doing -5 instead of 5 thanks, hehe now i feel kinda stupid...
Last edited by wac on Thu Aug 30, 2007 12:29 am, edited 1 time in total.
I see j00!
A
Ace-T
Halfop
Posts: 82
Joined: Tue Aug 29, 2006 7:25 am

Post by Ace-T »

came in handy, thx :)
Post Reply