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

Issue 130920043: code review 130920043: time: removed from tests now obsolete assumption about ...

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years, 8 months ago by alb
Modified:
9 years, 8 months ago
Reviewers:
bradfitz
CC:
golang-codereviews, bradfitz
Visibility:
Public.

Description

time: removed from tests now obsolete assumption about Australian tz abbreviations Australian timezones abbreviation for standard and daylight saving time were recently changed from EST for both to AEST and AEDT in the icann tz database (see changelog on www.iana.org/time-zones). A test in the time package was written to check that the ParseInLocation function understand that Feb EST and Aug EST are different time zones, even though they are both called EST. This is no longer the case, and the Date function now returns AEST or AEDT for australian tz on every Linux system with an up to date tz database (and this makes the test fail). Since I wasn't able to find another country that 1) uses daylight saving and 2) has the same abbreviation for both on tzdata, I changed the test to make sure that ParseInLocation does not get confused when it parses, in different locations, two dates with the same abbreviation (this was suggested in the mailing list). Fixes issue 8547.

Patch Set 1 #

Patch Set 2 : diff -r 7e00313f3b3a14e59d607aaab84416289dbc76f6 https://code.google.com/p/go #

Patch Set 3 : diff -r 7e00313f3b3a14e59d607aaab84416289dbc76f6 https://code.google.com/p/go #

Total comments: 4

Patch Set 4 : diff -r 9985ecf9828f87d8887550109060357e2163ab8a https://code.google.com/p/go #

Unified diffs Side-by-side diffs Delta from patch set Stats (+21 lines, -15 lines) Patch
M src/pkg/time/format_test.go View 1 2 3 1 chunk +21 lines, -15 lines 0 comments Download

Messages

Total messages: 5
alb
Hello golang-codereviews@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go
9 years, 8 months ago (2014-08-19 21:32:13 UTC) #1
bradfitz
https://codereview.appspot.com/130920043/diff/40001/src/pkg/time/format_test.go File src/pkg/time/format_test.go (right): https://codereview.appspot.com/130920043/diff/40001/src/pkg/time/format_test.go#newcode186 src/pkg/time/format_test.go:186: func TestParseAST(t *testing.T) { TestParseInLocation -- that's what it's ...
9 years, 8 months ago (2014-08-20 01:48:16 UTC) #2
alb
Renamed test name and location variables https://codereview.appspot.com/130920043/diff/40001/src/pkg/time/format_test.go File src/pkg/time/format_test.go (right): https://codereview.appspot.com/130920043/diff/40001/src/pkg/time/format_test.go#newcode186 src/pkg/time/format_test.go:186: func TestParseAST(t *testing.T) ...
9 years, 8 months ago (2014-08-20 12:56:31 UTC) #3
bradfitz
LGTM
9 years, 8 months ago (2014-08-21 17:35:37 UTC) #4
bradfitz
9 years, 8 months ago (2014-08-21 17:35:49 UTC) #5
*** Submitted as https://code.google.com/p/go/source/detail?r=7dba9475ee72 ***

time: removed from tests now obsolete assumption about Australian tz
abbreviations

Australian timezones abbreviation for standard and daylight saving time were
recently
changed from EST for both to AEST and AEDT in the icann tz database (see
changelog
on www.iana.org/time-zones).

A test in the time package was written to check that the ParseInLocation
function
understand that Feb EST and Aug EST are different time zones, even though they
are
both called EST. This is no longer the case, and the Date function now returns
AEST or AEDT for australian tz on every Linux system with an up to date tz
database
(and this makes the test fail).

Since I wasn't able to find another country that 1) uses daylight saving and 2)
has
the same abbreviation for both on tzdata, I changed the test to make sure that
ParseInLocation does not get confused when it parses, in different locations,
two
dates with the same abbreviation (this was suggested in the mailing list).

Fixes issue 8547.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://codereview.appspot.com/130920043

Committer: Brad Fitzpatrick <bradfitz@golang.org>
Sign in to reply to this message.

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