in reply to Re: Can't set timezone
in thread Can't set timezone

The theme variables are set in the Engine before code embedded in a node executes. I might play around with the theme changing code to see if I can regenerate $THEME in user settings.

I think it'll work, but there could be an order-of-operation bug. We'll see.

Update: My language is a bit imprecise. The real scoop is at EveryDevel (URL may be slightly off), with more than sufficient detail.

What happens, basically, is that the Engine receives a request, sets some global variables (including $THEME, which holds theme settings for the user), loads the requested node, loads the display page for the node, executes any code in the node (and there is code in the user settings node), generates the page, sends it to the browser, and updates the database with the new settings.

The code execution part changes the user setting that keeps track of which theme the user wants. It doesn't change $THEME accordingly. (In fact, it's probably already generated part of the page with the old theme).

I don't have any timezone code in the current codebase. I think vroom added that to Perlmonks on his own.

Replies are listed 'Best First'.
Re: Re: Re: Can't set timezone
by salvadors (Pilgrim) on Jan 02, 2001 at 17:36 UTC

    The theme variables are set in the Engine before code embedded in a node executes. I might play around with the theme changing code to see if I can regenerate $THEME in user settings.

    Surely the problem is that it's set *after* the code in the next node executes, rather than before?

    Otherwise it would work on the next page?

    Or am I missing something?

    Is the code available anywhere to look at? Or is it all proprietrary?

    Thanks,

    Tony

    ps Any ideas on the timezone bit?