I've read about this issue in old threads but didn't find any answers. I also found a new twist to it: the "time()" functions only gives you one hour ahead if in the public_html folder!
I used the command "date("Y-m-d H:i:s O I T Z", time())" where
I = Daylight savingstime or not
T = Timezone
Z = Time offset in seconds
First, I let it run as a cron job in the home/<user>/etc folder and got the result
2010-10-06 14:42:01 -0400 1 EDT -14400
this looks fine.
I then ran the command as a public script on my homepage and got
2010-10-06 15:47:21 -0400 1 EDT -14400
which is one hour early!
I also printed the time stamps so the difference is the result from the "time()" not "date()"
Of course I can code around this, but if this is known to the staff I would be interested to know about its cause. (I'm on starka by the way if that matters)
I used the command "date("Y-m-d H:i:s O I T Z", time())" where
I = Daylight savingstime or not
T = Timezone
Z = Time offset in seconds
First, I let it run as a cron job in the home/<user>/etc folder and got the result
2010-10-06 14:42:01 -0400 1 EDT -14400
this looks fine.
I then ran the command as a public script on my homepage and got
2010-10-06 15:47:21 -0400 1 EDT -14400
which is one hour early!
I also printed the time stamps so the difference is the result from the "time()" not "date()"
Of course I can code around this, but if this is known to the staff I would be interested to know about its cause. (I'm on starka by the way if that matters)