Last modified: 2014-09-02 11:21:13 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T54986, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 52986 - LocalisationUpdate shell script uses a funky date output (Sun Aug 18 08:24:16 UTC 2013)
LocalisationUpdate shell script uses a funky date output (Sun Aug 18 08:24:16...
Status: RESOLVED FIXED
Product: Wikimedia
Classification: Unclassified
Deployment systems (Other open bugs)
wmf-deployment
All All
: Low minor (vote)
: ---
Assigned To: Tina Johnson ( tinaj1234 )
: easy
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-18 08:26 UTC by MZMcBride
Modified: 2014-09-02 11:21 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description MZMcBride 2013-08-18 08:26:32 UTC
Inside operations/puppet.git, there's a shell script at files/misc/l10nupdate/l10nupdate-1 that runs LocalisationUpdate's ([[mw:Extension:LocalisationUpdate]]) update.php script and then logs to the server admin log ([[wikitech:SAL]]).

This shell script uses the output of `date` (presumably /bin/date), but date's default output is kind of stupid. Example:

$ date
Sun Aug 18 08:24:16 UTC 2013

The year comes after both the time and the time zone. This really doesn't make any sense. It'd be nice if date were passed an explicit format that was less stupid.
Comment 1 Antoine "hashar" Musso (WMF) 2013-08-26 15:02:55 UTC
Any recommendation?
Comment 2 Nemo 2013-08-26 15:19:36 UTC
date --rfc-3339=seconds might be the easiest
Comment 3 MZMcBride 2013-08-26 22:09:12 UTC
(In reply to comment #2)
> date --rfc-3339=seconds might be the easiest

Not sure if this was intended as a joke, but my version of BSD `date` doesn't have this flag. I looked up RFC 3339. I assume you mean [[ISO 8601]]. I think that format would be fine to resolve this bug.

(In reply to comment #1)
> Any recommendation?

ISO 8601 format as Nemo suggests in comment 2 would be fine. Or the equivalent of "~~~~~" expanded; MediaWiki's format is easy enough to read. :-)
Comment 4 Nemo 2013-08-27 09:23:59 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > date --rfc-3339=seconds might be the easiest
> 
> Not sure if this was intended as a joke, but my version of BSD `date` doesn't
> have this flag. I looked up RFC 3339. I assume you mean [[ISO 8601]]. I think
> that format would be fine to resolve this bug.

No, it's not a joke; date (GNU coreutils) 8.17.
$ date --rfc-3339=seconds
2013-08-27 11:20:33+02:00


> 
> (In reply to comment #1)
> > Any recommendation?
> 
> ISO 8601 format as Nemo suggests in comment 2 would be fine.

It's just a bit uglier. :)
$ date --iso-8601=seconds
2013-08-27T11:23:31+0200
Comment 5 Gerrit Notification Bot 2014-01-11 15:52:00 UTC
Change 106892 had a related patch set uploaded by Tinaj1234:
Changed date format in l10nupdate-1

https://gerrit.wikimedia.org/r/106892
Comment 6 Gerrit Notification Bot 2014-01-15 14:47:45 UTC
Change 106892 merged by Alexandros Kosiaris:
Changed date format in l10nupdate-1

https://gerrit.wikimedia.org/r/106892
Comment 7 Nemo 2014-01-15 21:50:32 UTC
(In reply to comment #2)
> date --rfc-3339=seconds might be the easiest

Oh, I forgot that was my suggestion. Anyway, merged; given the number of +1 I declare this fixed by popular vote.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links