ソースを参照

UI: Fix duplicate filename specifiers

Fix redundant specifiers and change specifiers to match Linux date
command.

Closes jp9000/obs-studio#531
bl 9 年 前
コミット
1194d093ef
3 ファイル変更7 行追加7 行削除
  1. 2 2
      obs/data/locale/en-US.ini
  2. 4 4
      obs/obs-app.cpp
  3. 1 1
      obs/window-basic-main.cpp

+ 2 - 2
obs/data/locale/en-US.ini

@@ -432,10 +432,10 @@ Basic.Settings.Output.Adv.FFmpeg.AEncoderSettings="Audio Encoder Settings (if an
 Basic.Settings.Output.Adv.FFmpeg.MuxerSettings="Muxer Settings (if any)"
 
 # basic mode 'output' settings - advanced section - recording subsection - completer
-FilenameFormatting.completer="%yyyy-%mm-%dd %hh-%mm-%ss\n%yy-%mm-%dd %hh-%mm-%ss\n%Y-%m-%d %H-%M-%S\n%y-%m-%d %H-%M-%S\n%a %Y-%m-%d %H-%M-%S\n%A %Y-%m-%d %H-%M-%S\n%Y-%b-%d %H-%M-%S\n%Y-%B-%d %H-%M-%S\n%Y-%m-%d %I-%M-%S-%p\n%Y-%m-%d %H-%M-%S-%z\n%Y-%m-%d %H-%M-%S-%Z"
+FilenameFormatting.completer="%CCYY-%MM-%DD %hh-%mm-%ss\n%YY-%MM-%DD %hh-%mm-%ss\n%Y-%m-%d %H-%M-%S\n%y-%m-%d %H-%M-%S\n%a %Y-%m-%d %H-%M-%S\n%A %Y-%m-%d %H-%M-%S\n%Y-%b-%d %H-%M-%S\n%Y-%B-%d %H-%M-%S\n%Y-%m-%d %I-%M-%S-%p\n%Y-%m-%d %H-%M-%S-%z\n%Y-%m-%d %H-%M-%S-%Z"
 
 # basic mode 'output' settings - advanced section - recording subsection - TT
-FilenameFormatting.TT="%yyyy		Year, four digits\n%yy		Year, last two digits (00-99)\n%mm		Month as a decimal number (01-12)\n%dd		Day of the month, zero-padded (01-31)\n%hh		Hour in 24h format (00-23)\n%mm		Minute (00-59)\n%ss		Second (00-61)\n%%		A % sign\n%a		Abbreviated weekday name\n%A		Full weekday name\n%b		Abbreviated month name\n%B		Full month name\n%d		Day of the month, zero-padded (01-31)\n%H		Hour in 24h format (00-23)\n%I		Hour in 12h format (01-12)\n%m		Month as a decimal number (01-12)\n%M		Minute (00-59)\n%p		AM or PM designation\n%S		Second (00-61)\n%y		Year, last two digits (00-99)\n%Y		Year\n%z		ISO 8601 offset from UTC or timezone\n		name or abbreviation\n%Z		Timezone name or abbreviation\n"
+FilenameFormatting.TT="%CCYY		Year, four digits\n%YY		Year, last two digits (00-99)\n%MM		Month as a decimal number (01-12)\n%DD		Day of the month, zero-padded (01-31)\n%hh		Hour in 24h format (00-23)\n%mm		Minute (00-59)\n%ss		Second (00-61)\n%%		A % sign\n%a		Abbreviated weekday name\n%A		Full weekday name\n%b		Abbreviated month name\n%B		Full month name\n%d		Day of the month, zero-padded (01-31)\n%H		Hour in 24h format (00-23)\n%I		Hour in 12h format (01-12)\n%m		Month as a decimal number (01-12)\n%M		Minute (00-59)\n%p		AM or PM designation\n%S		Second (00-61)\n%y		Year, last two digits (00-99)\n%Y		Year\n%z		ISO 8601 offset from UTC or timezone\n		name or abbreviation\n%Z		Timezone name or abbreviation\n"
 
 # basic mode 'video' settings
 Basic.Settings.Video="Video"

+ 4 - 4
obs/obs-app.cpp

@@ -944,10 +944,10 @@ string GenerateSpecifiedFilename(const char *extension, bool noSpace,
 
 	const size_t spec_count = 23;
 	const char *spec[][2] = {
-		{"%yyyy", "%Y"},
-		{"%yy",   "%y"},
-		{"%mm",   "%m"},
-		{"%dd",   "%d"},
+		{"%CCYY", "%Y"},
+		{"%YY",   "%y"},
+		{"%MM",   "%m"},
+		{"%DD",   "%d"},
 		{"%hh",   "%H"},
 		{"%mm",   "%M"},
 		{"%ss",   "%S"},

+ 1 - 1
obs/window-basic-main.cpp

@@ -750,7 +750,7 @@ bool OBSBasic::InitBasicConfigDefaults()
 	config_set_default_uint  (basicConfig, "Video", "BaseCY",   cy);
 
 	config_set_default_string(basicConfig, "Output", "FilenameFormatting",
-			"%yyyy-%mm-%dd %hh-%mm-%ss");
+			"%CCYY-%MM-%DD %hh-%mm-%ss");
 
 	config_set_default_bool  (basicConfig, "Output", "DelayEnable", false);
 	config_set_default_uint  (basicConfig, "Output", "DelaySec", 20);