Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(88)

Issue 11267051: Updated GetTimeZoneName() to return "" if localtime_r fails or has a NULL for its tm_zone value, li… (Closed)

Created:
8 years, 1 month ago by Tom Ball
Modified:
8 years, 1 month ago
Reviewers:
siva
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Updated GetTimeZoneName() to return "" if localtime_r fails or has a NULL for its tm_zone value, like V8 does. Also updated GetTimeZoneOffsetInSeconds() to return 0 on localtime_r failure, like V8. BUG=5943 Committed: https://code.google.com/p/dart/source/detail?r=14112

Patch Set 1 #

Total comments: 4

Patch Set 2 : Code review feedback: added parens, comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+34 lines, -26 lines) Patch
M runtime/vm/os_android.cc View 1 1 chunk +4 lines, -4 lines 0 comments Download
M runtime/vm/os_linux.cc View 1 1 chunk +4 lines, -4 lines 0 comments Download
M runtime/vm/os_macos.cc View 1 1 chunk +4 lines, -4 lines 0 comments Download
M runtime/vm/os_win.cc View 1 2 chunks +22 lines, -14 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Tom Ball
8 years, 1 month ago (2012-10-25 23:26:29 UTC) #1
siva
lgtm http://codereview.chromium.org/11267051/diff/1/runtime/vm/os_android.cc File runtime/vm/os_android.cc (right): http://codereview.chromium.org/11267051/diff/1/runtime/vm/os_android.cc#newcode32 runtime/vm/os_android.cc:32: return succeeded && decomposed.tm_zone != NULL ? decomposed.tm_zone ...
8 years, 1 month ago (2012-10-25 23:31:40 UTC) #2
Tom Ball
8 years, 1 month ago (2012-10-25 23:38:11 UTC) #3
http://codereview.chromium.org/11267051/diff/1/runtime/vm/os_android.cc
File runtime/vm/os_android.cc (right):

http://codereview.chromium.org/11267051/diff/1/runtime/vm/os_android.cc#newco...
runtime/vm/os_android.cc:32: return succeeded && decomposed.tm_zone != NULL ?
decomposed.tm_zone : "";
On 2012/10/25 23:31:40, siva wrote:
> suggest parens for better readability
> return (succeeded && decomposed.tm_zone != NULL) ? .....
> 
> Same comment in the other files too.

Done.

http://codereview.chromium.org/11267051/diff/1/runtime/vm/os_android.cc#newco...
runtime/vm/os_android.cc:39: // Even if the offset was 24 hours it would still
easily fit into 32 bits.
On 2012/10/25 23:31:40, siva wrote:
> Do we need to add the same comment here regarding compatibility with v8
> behaviour.

Done.

Powered by Google App Engine
This is Rietveld 408576698