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

Side by Side Diff: chrome/browser/chromeos/gdata/gdata_util.cc

Issue 10542076: ABANDONED: chromeos: Download contacts (work in progress). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: minor changes Created 8 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/gdata/gdata_util.h" 5 #include "chrome/browser/chromeos/gdata/gdata_util.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 *parsed_time = base::Time::FromUTCExploded(exploded); 560 *parsed_time = base::Time::FromUTCExploded(exploded);
561 if (offset_to_utc_in_minutes != 0) 561 if (offset_to_utc_in_minutes != 0)
562 *parsed_time -= base::TimeDelta::FromMinutes(offset_to_utc_in_minutes); 562 *parsed_time -= base::TimeDelta::FromMinutes(offset_to_utc_in_minutes);
563 } else { 563 } else {
564 *parsed_time = base::Time::FromLocalExploded(exploded); 564 *parsed_time = base::Time::FromLocalExploded(exploded);
565 } 565 }
566 566
567 return true; 567 return true;
568 } 568 }
569 569
570 std::string FormatTimeAsString(const base::Time& time) {
571 base::Time::Exploded exploded;
572 time.UTCExplode(&exploded);
573 return base::StringPrintf(
574 "%04d-%02d-%02dT%02d:%02d:%02d.%03dZ",
575 exploded.year, exploded.month, exploded.day_of_month,
576 exploded.hour, exploded.minute, exploded.second, exploded.millisecond);
577 }
578
570 } // namespace util 579 } // namespace util
571 } // namespace gdata 580 } // namespace gdata
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_util.h ('k') | chrome/browser/chromeos/gdata/gdata_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698