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.

can't set timezone...

General support and discussion of Eggdrop bots.
Post Reply
F
FallFromGrace
Voice
Posts: 17
Joined: Mon Jul 28, 2008 8:52 am

can't set timezone...

Post by FallFromGrace »

I have a server with Debian linux, and it works perfect. But some time ago I have tried Ubuntu 10.10. It's almost same as Debian, but today i have found a problem which I still can't solve.

I have a 2 bots. I need to set CET (gmt-1) timezone to first of them, and GMT+0 to anther one.

I have setted up a tzconfig ( sudo dpkg-reconfigure tzdata) to GMT-1, and it works well in console:
[user@ip-10-10-10-10 ~]$ date
Tue Jan 25 13:33:57 GMT-1 2011
[bitnami@ip-10-10-10-10 ~]$ date -u
Tue Jan 25 12:33:59 UTC 2011
But bot still use UTC =(

My eggdrop.conf:
set timezone "GMT"
set offset "-1"
set env(TZ) "$timezone $offset"
I have tried to change offset to another values, but it doesnt take effect at all (unlike my bots at Debian Linux)! Even if i change timezone or comment out env(TZ), bot still has UTC timezone.

How can i fix it?
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Re: can't set timezone...

Post by speechles »

FallFromGrace wrote:My eggdrop.conf:
set timezone "GMT"
set offset "-1"
set env(TZ) "$timezone $offset"
I have tried to change offset to another values, but it doesnt take effect at all (unlike my bots at Debian Linux)! Even if i change timezone or comment out env(TZ), bot still has UTC timezone.

How can i fix it?
Um.. Why is your timezone "GMT" if you aren't in GMT/UTC? :roll: If you are GMT-1 then your timezone is "AT". Your assumption that "CET" is GMT-1 is incorrect. "CET" is GMT+1. My timezone in California, is GMT-8 or "PST". You need to use the "name" of the timezone in the timezone setting. One that eggdrop understands. Hence your use of "GMT" within the timezone setting will make the bot think you are GMT/UTC.

The offset is only ever used to tell the bot how far from GMT/UTC your time is. Not it's offset from the timezone you've set in the "timezone" setting.
t
thommey
Halfop
Posts: 76
Joined: Tue Apr 01, 2008 2:59 pm

Post by thommey »

Code: Select all

set env(TZ) "$timezone $offset"
is actually a bug (fixed in cvs), it should be

Code: Select all

set env(TZ) "$timezone$offset"
maybe that helps, too
F
FallFromGrace
Voice
Posts: 17
Joined: Mon Jul 28, 2008 8:52 am

Post by FallFromGrace »

thommey wrote:

Code: Select all

set env(TZ) "$timezone $offset"
is actually a bug (fixed in cvs), it should be

Code: Select all

set env(TZ) "$timezone$offset"
maybe that helps, too
Thank you, it works)
Post Reply