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

Unified Diff: runtime/bin/http_utils.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_utils.dart
diff --git a/runtime/bin/http_utils.dart b/runtime/bin/http_utils.dart
index 5414510bf38601c73da6c0e366a890841cb1932d..f49fc0ac94ab2b842f5c127686a0448f3b2c8d03 100644
--- a/runtime/bin/http_utils.dart
+++ b/runtime/bin/http_utils.dart
@@ -98,7 +98,7 @@ class _HttpUtils {
List month = ["Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
- Date d = date.changeTimeZone(new TimeZone.utc());
+ Date d = date.toUtc();
StringBuffer sb = new StringBuffer();
sb.add(wkday[d.weekday]);
sb.add(", ");
@@ -234,8 +234,7 @@ class _HttpUtils {
expect("GMT");
}
expectEnd();
- TimeZone utc = new TimeZone.utc();
- return new Date.withTimeZone(
- year, month + 1, day, hours, minutes, seconds, 0, utc);
+ return new Date(
+ year, month + 1, day, hours, minutes, seconds, 0, isUtc: true);
}
}

Powered by Google App Engine
This is Rietveld 408576698