chenxiaolong / BCR

A Basic Call Recorder for rooted Android devices
GNU General Public License v3.0
1.67k stars 109 forks source link

Double dot is replace by underscore #363

Closed lavoie005 closed 1 year ago

lavoie005 commented 1 year ago

Hi, When i try this format [{phone_number} |][[{contact_name} |{caller_name} |{call_log_name}] |]{date:dd-mm-yyyy@k'h'mm(XXX zzzz)}[-{direction}|]

The ":" is replace by "_" so i read 14-06-2023@15h43(-04_00 EST Time) it suppose to be (-04:00 EST Time) same thing happen when i try to use 15:43 it replace by 15_43 Thank a lot for you Apps

chenxiaolong commented 1 year ago

Sorry, this restriction is enforced by Android itself (for Windows compatibility because Windows doesn't support : in filenames). There's nothing BCR can do to work around this. I'd suggest using XX instead of XXX for the time zone instead, which would give you +0400 without a separator in the middle.

lavoie005 commented 1 year ago

Thank for your quick response

lavoie005 commented 1 year ago

something i can do for replace the : by h for get -04h00

chenxiaolong commented 1 year ago

It doesn't look like there's a way to do that. I took a look at Java's date formatting documentation and it looks like these are the only options for the timezone:

  Pattern  Count  Equivalent builder methods
  -------  -----  --------------------------
    O       1      appendLocalizedOffset(TextStyle.SHORT)
    OOOO    4      appendLocalizedOffset(TextStyle.FULL)
    X       1      appendOffset("+HHmm","Z")
    XX      2      appendOffset("+HHMM","Z")
    XXX     3      appendOffset("+HH:MM","Z")
    XXXX    4      appendOffset("+HHMMss","Z")
    XXXXX   5      appendOffset("+HH:MM:ss","Z")
    x       1      appendOffset("+HHmm","+00")
    xx      2      appendOffset("+HHMM","+0000")
    xxx     3      appendOffset("+HH:MM","+00:00")
    xxxx    4      appendOffset("+HHMMss","+0000")
    xxxxx   5      appendOffset("+HH:MM:ss","+00:00")
    Z       1      appendOffset("+HHMM","+0000")
    ZZ      2      appendOffset("+HHMM","+0000")
    ZZZ     3      appendOffset("+HHMM","+0000")
    ZZZZ    4      appendLocalizedOffset(TextStyle.FULL)
    ZZZZZ   5      appendOffset("+HH:MM:ss","Z")

They all either have : or no separator at all.