We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d3a4ade commit d3e0b3aCopy full SHA for d3e0b3a
lib/command_duration.bash
@@ -5,8 +5,12 @@
5
# Get shell duration in decimal format regardless of runtime locale.
6
# Notice: This function runs as a sub-shell - notice '(' vs '{'.
7
function _shell_duration_en() (
8
- # DFARREL You would think LC_NUMERIC would do it, but not working in my local
9
- LC_ALL='en_US.UTF-8'
+ # DFARREL You would think LC_NUMERIC would do it, but not working in my local.
+ # Note: LC_ALL='en_US.UTF-8' has been used to enforce the decimal point to be
10
+ # a period, but the specific locale 'en_US.UTF-8' is not ensured to exist in
11
+ # the system. One should instead use the locale 'C', which is ensured by the
12
+ # C and POSIX standards.
13
+ local LC_ALL=C
14
printf "%s" "${EPOCHREALTIME:-$SECONDS}"
15
)
16
0 commit comments