Any ideas as to why I can't set my timezone? When I set it on my User Settings page, it seems to set fine (i.e. when the page reloads after the submit, it has my correct timezone set), but then when I go anywhere else it's still wrong. Returning to the User Settings page has me back at UTC-11 again :(

Interestingly, when I try to change my Theme, it doesn't change on 'submit' either, but the drop-down defaults to my choice, and hitting submit *again*, will change the Theme. But I need to hit submit twice again to change it back.

Changing timezone doesn't work at all though ...

Thanks,

Tony

Replies are listed 'Best First'.
Re: Can't set timezone
by Fastolfe (Vicar) on Jan 02, 2001 at 02:44 UTC
    Changing your theme won't take effect until *after* the resulting page is rendered. So you get the form, make your theme change, click submit, get back the form again with the old theme. Your next action (hitting submit again is what you did, but you could easily just click on any link) will be rendered with the new theme. It's just a quirk.
      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.

        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?