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

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: 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 05c0a8f3907ac8e08d5e94d19a022374a5f9430a..3e93389095d0e8909fdc3433207b33c6458392f1 100644
--- a/runtime/bin/http_impl.dart
+++ b/runtime/bin/http_impl.dart
@@ -90,8 +90,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);
}
@@ -110,8 +109,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