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

Unified Diff: runtime/bin/http_utils.dart

Issue 10538105: Make isUtc a getter, change some method names in Date. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 8 years, 6 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
« no previous file with comments | « runtime/bin/file_impl.dart ('k') | runtime/bin/timer_impl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/http_utils.dart
diff --git a/runtime/bin/http_utils.dart b/runtime/bin/http_utils.dart
index 6c4a506914928f81e8f3a745ef2a31e660bcdd37..43abd3147be0c9ef368c9f1cb44c94c82e4556ef 100644
--- a/runtime/bin/http_utils.dart
+++ b/runtime/bin/http_utils.dart
@@ -100,19 +100,19 @@ class _HttpUtils {
Date d = date.toUtc();
StringBuffer sb = new StringBuffer();
- sb.add(wkday[d.weekday]);
+ sb.add(wkday[d.weekday - 1]);
sb.add(", ");
sb.add(d.day.toString());
sb.add(" ");
sb.add(month[d.month - 1]);
sb.add(" ");
sb.add(d.year.toString());
- d.hours < 9 ? sb.add(" 0") : sb.add(" ");
- sb.add(d.hours.toString());
- d.minutes < 9 ? sb.add(":0") : sb.add(":");
- sb.add(d.minutes.toString());
- d.seconds < 9 ? sb.add(":0") : sb.add(":");
- sb.add(d.seconds.toString());
+ d.hour < 9 ? sb.add(" 0") : sb.add(" ");
+ sb.add(d.hour.toString());
+ d.minute < 9 ? sb.add(":0") : sb.add(":");
+ sb.add(d.minute.toString());
+ d.second < 9 ? sb.add(":0") : sb.add(":");
+ sb.add(d.second.toString());
sb.add(" GMT");
return sb.toString();
}
« no previous file with comments | « runtime/bin/file_impl.dart ('k') | runtime/bin/timer_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698