https://bugzilla.wikimedia.org/show_bug.cgi?id=32351
--- Comment #6 from Van de Bugger <[email protected]> 2011-11-17 21:00:51 UTC --- > I don't really like #time: with no formatting string being user pref. It > should probably have some symbol to specify that user time preference is > wanted. #time does not interpret format string, but pass it to Language::sprintfDate. I do not like an idea to parse format string in #time -- it is not trivial due to backslashes, double quotes, di- and trigraphs. So for #time simplicity, format string should be passed to Language::sprintfDate. The latter can be modified asily to recognize one more special character. But, since it is just a place holder for user-specific format string, it should be parsed. Natural way to parse format string is pass it to Language::sprintfDate… This makes Language::sprintfDate a recursive function, so we should take special care about infinite recursion. Let us don't overcomplicate this stuff. Empty format string is good enough for denoting user-defined date/time format. > Having timel be user preference time is also something I'm not sure how i feel > about. If we want that it should perhaps be a different name then something > already used for server time. Who (except sever admins) takes care of server time? Server can be located in any place in the world, in any timezone, it should not make difference for users. > Personally I don't like that we have user time preferences at all, I think it > just adds confusion, but thats off topic and just my personal opinion For sites like Wikipedia, timestamps probably are not too important, and can be displayed in UTC or server time. But I am working on site based on Semantic MediaWiki, it is a kind of database, where timestamps are important -- it is one of basic datatypes. All the timestamps are stored in UTC, but they are presented to a user in user local time (with a help from #timel). > However, if we do make timel be user time, then we'd need to make sure user > time preferences are added to parser cache key, or it will be all mixed up Which cache? Do you mean this case (a beginning of `time' function in `ParserFunctions_body.php'): if ( isset( self::$mTimeCache[$format][$date][$language][$local] ) ) { return self::$mTimeCache[$format][$date][$language][$local]; } Err… I am not experienced Mw-PHP-Web hacker… Is this variable shared between different HTTP requests? If not, it seems everything is in place. I am worrying about another cache. Can MW cache entire pages and return already rendered page to different users? If so, either result of #timel will be reported incorrectly, or #timel can invalidate cache and load the server heavily. However, I am not sure, it is just a guessing. -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
