Skip to content

Commit

Permalink
Change the screenshot file format not to use colons.
Browse files Browse the repository at this point in the history
As is suggested in crbug.com/133956 comment chromium#5,
- add " at " between date and time
- use dot instead of colon for time, since colon is not allowed for HFS+/FAT32

BUG=133956, 140355


Review URL: https://chromiumcodereview.appspot.com/10827177

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150216 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
mukai@chromium.org committed Aug 7, 2012
1 parent de90333 commit 0c6a081
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions chrome/browser/ui/ash/screenshot_taker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ std::string GetScreenShotBaseFilename(bool use_24hour_clock) {
// for non-English locales.
// TODO(mukai): integrate this logic somewhere time_formatting.h
std::string file_name = base::StringPrintf(
"Screenshot %d-%02d-%02d ", now.year, now.month, now.day_of_month);
"Screenshot %d-%02d-%02d at ", now.year, now.month, now.day_of_month);

if (use_24hour_clock) {
file_name.append(base::StringPrintf(
"%02d:%02d:%02d", now.hour, now.minute, now.second));
"%02d.%02d.%02d", now.hour, now.minute, now.second));
} else {
int hour = now.hour;
if (hour > 12) {
Expand All @@ -72,7 +72,7 @@ std::string GetScreenShotBaseFilename(bool use_24hour_clock) {
hour = 12;
}
file_name.append(base::StringPrintf(
"%d:%02d:%02d ", hour, now.minute, now.second));
"%d.%02d.%02d ", hour, now.minute, now.second));
file_name.append((now.hour >= 12) ? "PM" : "AM");
}

Expand Down

0 comments on commit 0c6a081

Please sign in to comment.