you want "$gmt" in place of "$ctime($date $gmt)" :P
and isn't PST always GMT -8? you shouldn't be adding $daylight there since $gmt is unaffected by daylight savings. btw, good to see you around :*