Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(544)

Issue 9997043: code review 9997043: time: provide timezone abbreviations on windows (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 1 month ago by brainman
Modified:
12 years, 1 month ago
Reviewers:
rsc
CC:
golang-dev, rsc
Visibility:
Public.

Description

time: provide timezone abbreviations on windows Use http://unicode.org/cldr/data/common/supplemental/windowsZones.xml to generate the map. Fixes issue 4838.

Patch Set 1 #

Patch Set 2 : diff -r f809e1e845c4 https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r f809e1e845c4 https://go.googlecode.com/hg/ #

Total comments: 6

Patch Set 4 : diff -r 657760a60531 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+350 lines, -15 lines) Patch
A src/pkg/time/Makefile View 1 2 3 1 chunk +9 lines, -0 lines 0 comments Download
A src/pkg/time/export_windows_test.go View 1 1 chunk +10 lines, -0 lines 0 comments Download
A src/pkg/time/genzabbrs.go View 1 2 3 1 chunk +145 lines, -0 lines 0 comments Download
A src/pkg/time/zoneinfo_abbrs_windows.go View 1 2 3 1 chunk +115 lines, -0 lines 0 comments Download
M src/pkg/time/zoneinfo_windows.go View 1 5 chunks +36 lines, -15 lines 0 comments Download
A src/pkg/time/zoneinfo_windows_test.go View 1 1 chunk +35 lines, -0 lines 0 comments Download

Messages

Total messages: 3
brainman
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://go.googlecode.com/hg/
12 years, 1 month ago (2013-06-04 07:48:39 UTC) #1
rsc
LGTM https://codereview.appspot.com/9997043/diff/5001/lib/time/genzabbrs.go File lib/time/genzabbrs.go (right): https://codereview.appspot.com/9997043/diff/5001/lib/time/genzabbrs.go#newcode8 lib/time/genzabbrs.go:8: // go run genzabbrs.go | gofmt > $GOROOT/src/pkg/time/zoneinfo_abbrs_windows.go ...
12 years, 1 month ago (2013-06-04 11:44:47 UTC) #2
brainman
12 years, 1 month ago (2013-06-06 06:30:35 UTC) #3
*** Submitted as https://code.google.com/p/go/source/detail?r=60e04bb0d8b9 ***

time: provide timezone abbreviations on windows

Use http://unicode.org/cldr/data/common/supplemental/windowsZones.xml
to generate the map.

Fixes issue 4838.

R=golang-dev, rsc
CC=golang-dev
https://codereview.appspot.com/9997043

https://codereview.appspot.com/9997043/diff/5001/lib/time/genzabbrs.go
File lib/time/genzabbrs.go (right):

https://codereview.appspot.com/9997043/diff/5001/lib/time/genzabbrs.go#newcode8
lib/time/genzabbrs.go:8: // go run genzabbrs.go | gofmt >
$GOROOT/src/pkg/time/zoneinfo_abbrs_windows.go
On 2013/06/04 11:44:47, rsc wrote:
> ...
> Please create a Makefile containing:
> 
> windows:
>     go run genzabbrs.go | gofmt >zoneinfo_abbrs_window.go

I had to split this into 2 step process (build genzabbrs executable, then run
it), because it overwrites time package files if it built in one step and fails
to build. Just like it is done in pkg/unicode.

https://codereview.appspot.com/9997043/diff/5001/lib/time/genzabbrs.go#newcod...
lib/time/genzabbrs.go:105: const prog = `
On 2013/06/04 11:44:47, rsc wrote:
> Please move this to the bottom of the file (after func main). It's nice to
know
> that once you see the template program you've reached the end of the real
> program.

Done.

https://codereview.appspot.com/9997043/diff/5001/lib/time/genzabbrs.go#newcod...
lib/time/genzabbrs.go:121: {{range .Zs}}	"{{.WinName}}": abbr{"{{.StTime}}",
"{{.DSTime}}"}, // {{.UnixName}}
On 2013/06/04 11:44:47, rsc wrote:
> s/abbr//

Done.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b