dreamatdrew: "Dreamwidth Irish Pub", overprinted on green around a pint glass with Celtic knotwork on it. (Pub)
Drew M.C. ([personal profile] dreamatdrew) wrote in [site community profile] dw_dev2011-11-14 05:12 am
Entry tags:

What time is it again?

So, I finally managed to get an up-to-date copy of DW's source, and went about installing.
And... checkconfig tells me no. "Timezone must be UTC."
This is from http://bugs.dwscoalition.org/show_bug.cgi?id=3785 , which specifically added the check because "[t]he code expects system time to be GMT or really weird things happen".

I do not function on GMT. Therefore, my computer does not function on GMT. Therefore, no DW install for me.

So, I did a LITTLE investigating. Unless I'm completely mistaken, the "gimmie GMT" time functions are already built in to core perl. So, it should be possible to hack out that little requirement. Yes, it'd be a lot of tediousness. But I'm thinking not actually all that hard.

Am I wrong here? Opinions plz?
pauamma: Cartooney crab wearing hot pink and acid green facemask holding drink with straw (Default)

[personal profile] pauamma 2011-11-14 12:22 pm (UTC)(link)
I do not function on GMT. Therefore, my computer does not function on GMT.
I'm missing a link there. The NVRAM clock on my computer is set to GMT, systemwide timezone is GMT, and I set my user account to use $local_timezone{me}. The syslog timestamps use GMT, but that doesn't bother me. If it's a problem for you, or if for any reason you want $local_timezone{you} as the systemwide timezone (and NVRAM clock), you could reverse that design and set the shell account you use for running DW to GMT. Would that fix your problem?
geekosaur: orange tabby with head canted 90 degrees, giving impression of "maybe it'll make more sense if I look at it this way?" (Default)

[personal profile] geekosaur 2011-11-15 02:05 am (UTC)(link)
Not a hack at all. I set timezone for my account in my ec2 instance (the system default is UTC).

As for the rest, it occurs to me that it's not just Perl that one might need to worry about. Consider default values for DATETIME columns in mysql, for example. (The database engine runs under its own account.)
pauamma: Cartooney crab wearing hot pink and acid green facemask holding drink with straw (Default)

[personal profile] pauamma 2011-11-18 05:03 pm (UTC)(link)
I suspect the main hurdle will be making sure all servers are consistent. (Database, web, Mogile, and maybe also Perlbal and Pound.)
denise: Image: Me, facing away from camera, on top of the Castel Sant'Angelo in Rome (Default)

[staff profile] denise 2011-11-15 02:07 am (UTC)(link)
FYI, that check was put in because if the timezone of the DW user account isn't UTC, bad bad bad things happen. The code expects UTC, so we figured it'd be better to make the expectation clear so nothing went fwoom later.
alierak: (Default)

[personal profile] alierak 2011-11-15 03:00 am (UTC)(link)
Yeah, but I think the question was more along the lines of what part of the code goes fwoom and can we fix it. I don't think anyone's attempted to answer that yet.
exor674: Computer Science is my girlfriend (Default)

[personal profile] exor674 2011-11-15 02:09 pm (UTC)(link)
We should. It's just that we've made the assumption in so many places, adding the check now was easier then fixing all the places. That should totally be a long-term project.
afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)

[personal profile] afuna 2011-11-16 04:22 am (UTC)(link)
Filed!
Edited 2011-11-16 04:23 (UTC)
pauamma: Cartooney crab wearing hot pink and acid green facemask holding drink with straw (Default)

[personal profile] pauamma 2011-11-18 05:06 pm (UTC)(link)
I'm pretty sure that S2 is (or maybe was) one of the things that can't deal. (Remember that LJ server that was on Pacific time?)
denise: Image: Me, facing away from camera, on top of the Castel Sant'Angelo in Rome (Default)

[staff profile] denise 2011-11-18 05:07 pm (UTC)(link)
oh god. *whimper* yes.
alierak: (Default)

[personal profile] alierak 2011-11-15 03:37 am (UTC)(link)
It should absolutely be possible. There is plenty of code that assumes localtime is different from gmtime; any that doesn't should be considered a bug, or else we need to go back and simplify all the functions that conditionally use gmtime...