Commit 0c6a0813 authored by mukai@chromium.org's avatar mukai@chromium.org

Change the screenshot file format not to use colons.

As is suggested in crbug.com/133956 comment #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
parent de90333e
...@@ -59,11 +59,11 @@ std::string GetScreenShotBaseFilename(bool use_24hour_clock) { ...@@ -59,11 +59,11 @@ std::string GetScreenShotBaseFilename(bool use_24hour_clock) {
// for non-English locales. // for non-English locales.
// TODO(mukai): integrate this logic somewhere time_formatting.h // TODO(mukai): integrate this logic somewhere time_formatting.h
std::string file_name = base::StringPrintf( 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) { if (use_24hour_clock) {
file_name.append(base::StringPrintf( file_name.append(base::StringPrintf(
"%02d:%02d:%02d", now.hour, now.minute, now.second)); "%02d.%02d.%02d", now.hour, now.minute, now.second));
} else { } else {
int hour = now.hour; int hour = now.hour;
if (hour > 12) { if (hour > 12) {
...@@ -72,7 +72,7 @@ std::string GetScreenShotBaseFilename(bool use_24hour_clock) { ...@@ -72,7 +72,7 @@ std::string GetScreenShotBaseFilename(bool use_24hour_clock) {
hour = 12; hour = 12;
} }
file_name.append(base::StringPrintf( 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"); file_name.append((now.hour >= 12) ? "PM" : "AM");
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment