Question about obscure historical detail: Who picked UTC as Wikimedia time? When was this, and what was the thought process?
(the answer is almost certainly "Brion or Jimbo, early 2001, it's the obvious choice", but I'm just curious as to details.)
- d.
In 2001 when Magnus was writing the initial attempt at a custom wiki engine in PHP backed by MySQL, he chose to use the TIMESTAMP column type.
TIMESTAMPs in MySQL 3 were automatically filled out by the server at INSERT time, normalized to UTC, and exposed in the 14-digit YYYYMMDDHHMMSS format we still know and love today.
The first TIMESTAMP column in a row also got automatically updated when you changed something in a row, so we ended up switching them from TIMESTAMP type to text strings and just filled out the initial values on the PHP side. We could have used DATETIME but that would have been a slightly harder transition at the time, and would have introduced the fun of the server settings trying to give you local time half the time...
-- brion
On Mon, May 9, 2016 at 1:39 AM, David Gerard dgerard@gmail.com wrote:
Question about obscure historical detail: Who picked UTC as Wikimedia time? When was this, and what was the thought process?
(the answer is almost certainly "Brion or Jimbo, early 2001, it's the obvious choice", but I'm just curious as to details.)
- d.
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
UseMod had a concept of "server time", and early versions of the main page stated that server time was US Pacific Time. The date on the main page was heroically updated manually by Malcolm Farmer, for example:
https://en.wikipedia.org/w/index.php?title=HomePage&diff=331652346&oldid=331652345
This archived RecentChanges gives you an idea of what the interface looked like, the timezone is not specified ($ScriptTZ was not set) but it is presumably all Pacific Time:
https://web.archive.org/web/20011015062802/http://www.wikipedia.com/wiki/Recent_Changes
UseMod stored dates in UNIX time (integer since epoch), which is implicitly UTC, but converted them to server time for display.
Magnus's Wikipedia script also stored dates in UTC format, and defaulted to server time for display. It had a user preference called "hourDiff" which was relative to server time. For example in special_recentchangeslayout.php:
$adjusted_time_sc = tsc ( $s->cur_timestamp ) + 3600 * $user->options["hourDiff"]; $day = date ( "l, F d, Y" , $adjusted_time_sc); $time = date ( "H:i" , $adjusted_time_sc ) ;
tsc() converts the database time to UNIX time.
There were actually no references to UTC or GMT in the code base, and it never calls gmdate() . So it seems Magnus more or less carried on the same UI time zone policy as UseMod. If it was installed on the same server as UseMod, then it presumably would have displayed Pacific Time.
On the other hand, the early version of phase3 I have here does make references to UTC, for example:
"timezonetext" => "Enter number of hours your local time differs from server time (UTC).",
Instead of converting database dates to server time, phase3's Language::date() and Language::time() just takes substrings of the database date:
if( $wgAmericanDates ) { $d = $this->getMonthAbbreviation( substr( $ts, 4, 2 ) ) . " " . (0 + substr( $ts, 6, 2 )) . ", " . substr( $ts, 0, 4 ); } else { $d = (0 + substr( $ts, 6, 2 )) . " " . $this->getMonthAbbreviation( substr( $ts, 4, 2 ) ) . " " . substr( $ts, 0, 4 ); }
So for the elevation of UTC as a standard in the UI, I think we can safely credit Lee Daniel Crocker.
-- Tim Starling
On 10/05/16 02:15, Brion Vibber wrote:
In 2001 when Magnus was writing the initial attempt at a custom wiki engine in PHP backed by MySQL, he chose to use the TIMESTAMP column type.
TIMESTAMPs in MySQL 3 were automatically filled out by the server at INSERT time, normalized to UTC, and exposed in the 14-digit YYYYMMDDHHMMSS format we still know and love today.
The first TIMESTAMP column in a row also got automatically updated when you changed something in a row, so we ended up switching them from TIMESTAMP type to text strings and just filled out the initial values on the PHP side. We could have used DATETIME but that would have been a slightly harder transition at the time, and would have introduced the fun of the server settings trying to give you local time half the time...
-- brion
On Mon, May 9, 2016 at 1:39 AM, David Gerard dgerard@gmail.com wrote:
Question about obscure historical detail: Who picked UTC as Wikimedia time? When was this, and what was the thought process?
(the answer is almost certainly "Brion or Jimbo, early 2001, it's the obvious choice", but I'm just curious as to details.)
- d.
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
On Mon, May 9, 2016 at 6:15 PM, Brion Vibber bvibber@wikimedia.org wrote:
In 2001 when Magnus was writing the initial attempt at a custom wiki engine in PHP backed by MySQL, he chose to use the TIMESTAMP column type.
TIMESTAMPs in MySQL 3 were automatically filled out by the server at INSERT time, normalized to UTC, and exposed in the 14-digit YYYYMMDDHHMMSS format we still know and love today.
By the way, if we had to design this from the scratch, TIMESTAMPs now allow to not be auto set https://dev.mysql.com/doc/refman/5.6/en/timestamp-initialization.html This would save 15 - 4 = 11 bytes per row. However, both in code and migration effort + potential bugs + backwards compatibility, this is not worth it.
On 2016-05-10 1:23 AM, Jaime Crespo wrote:
On Mon, May 9, 2016 at 6:15 PM, Brion Vibber bvibber@wikimedia.org wrote:
In 2001 when Magnus was writing the initial attempt at a custom wiki engine in PHP backed by MySQL, he chose to use the TIMESTAMP column type.
TIMESTAMPs in MySQL 3 were automatically filled out by the server at INSERT time, normalized to UTC, and exposed in the 14-digit YYYYMMDDHHMMSS format we still know and love today.
By the way, if we had to design this from the scratch, TIMESTAMPs now allow to not be auto set https://dev.mysql.com/doc/refman/5.6/en/timestamp-initialization.html This would save 15 - 4 = 11 bytes per row. However, both in code and migration effort + potential bugs + backwards compatibility, this is not worth it.
Plus TIMESTAMP suffers from the year 2038 problem. https://en.wikipedia.org/wiki/Year_2038_problem
DATETIME only needs to worry about the Y10K problem. https://en.wikipedia.org/wiki/Year_10,000_problem
~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://danielfriesen.name/]
David Gerard wrote:
Question about obscure historical detail: Who picked UTC as Wikimedia time? When was this, and what was the thought process?
(the answer is almost certainly "Brion or Jimbo, early 2001, it's the obvious choice", but I'm just curious as to details.)
Maybe Lee in 2002? Here's what I dug up.
https://phabricator.wikimedia.org/rSVN633
This revision by Lee from July 10, 2002 added the ability for users to specify a time zone offset in hours. It also added three messages: timezonetext, localtime, and timezoneoffset.
Of particular note, the text for the timezonetext key reads:
Enter number of hours your local time differs from server (U.S. Pacific) time. For example, for U.S. East coast, enter "3".
https://phabricator.wikimedia.org/rSVN635
This revision (same author and day) reiterates that the server time is "U.S. Pacific" when establishing the dellogpagetext and uploadlogpagetext messages.
https://phabricator.wikimedia.org/rSVN723
This revision by Brion from August 28, 2002 adds a first draft of Esperanto translations. I believe (I don't read and write Esperanto) that the uploadlogpagetext and dellogpagetext messages say that the server time is UTC. However, the timezonetext message appears to say that the server time is UTC-8 and that if you want to use Central European Time, you need to specify an offset of 9 hours.
https://phabricator.wikimedia.org/rSVN744
This revision by Lee from September 5, 2002 changes the timezonetext, uploadlogpagetext, and dellogpagetext messages to read "UTC" instead of "U.S. Pacific".
https://phabricator.wikimedia.org/rSVN773
This revision by Brion from September 18, 2002 introduces the $wgLocaltimezone configuration variable. I've updated https://www.mediawiki.org/wiki/Manual:$wgLocaltimezone to note this.
Looking at early English Wikipedia contributions, https://en.wikipedia.org/w/index.php?oldid=56697 is the oldest edit I can find of a signed comment that includes a time zone: "05:42 Jul 21, 2002 (PDT)". There are many older signatures, to be sure, and some of them in early 2002 include a date, but without a time zone. This signature seems to confirm that the time zone was U.S. Pacific time in 2002.
MZMcBride
wikitech-l@lists.wikimedia.org