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

Unified Diff: runtime/bin/http_impl.dart

Issue 10411057: Deprecate use of timezones. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix code using old api. Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: runtime/bin/http_impl.dart
diff --git a/runtime/bin/http_impl.dart b/runtime/bin/http_impl.dart
index 6c4db412700a266f8c7009da6a0a09628da3ede1..9765c64c6bacad1545663368f482a5b96a5b5cae 100644
--- a/runtime/bin/http_impl.dart
+++ b/runtime/bin/http_impl.dart
@@ -91,8 +91,7 @@ class _HttpHeaders implements HttpHeaders {
void set date(Date date) {
_checkMutable();
// Format "Date" header with date in Greenwich Mean Time (GMT).
- String formatted =
- _HttpUtils.formatDate(expires.changeTimeZone(new TimeZone.utc()));
+ String formatted = _HttpUtils.formatDate(expires.toUtc());
_set("date", formatted);
}
@@ -111,8 +110,7 @@ class _HttpHeaders implements HttpHeaders {
void set expires(Date expires) {
_checkMutable();
// Format "Expires" header with date in Greenwich Mean Time (GMT).
- String formatted =
- _HttpUtils.formatDate(expires.changeTimeZone(new TimeZone.utc()));
+ String formatted = _HttpUtils.formatDate(expires.toUtc());
_set("expires", formatted);
}

Powered by Google App Engine
This is Rietveld 408576698