File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,9 @@ generate_segmentrc() {
66 read -d ' ' rccontents << EORC
77# date(1) format for the time. Americans might want to have "%I:%M %p".
88export TMUX_POWERLINE_SEG_TIME_FORMAT="${TMUX_POWERLINE_SEG_TIME_FORMAT_DEFAULT} "
9+ # Change this to display a different timezone than the system default.
10+ # Use TZ Identifier like "America/Los_Angeles"
11+ export TMUX_POWERLINE_SEG_TIME_TZ=""
912EORC
1013 echo " $rccontents "
1114}
@@ -18,6 +21,10 @@ __process_settings() {
1821
1922run_segment () {
2023 __process_settings
21- date +" $TMUX_POWERLINE_SEG_TIME_FORMAT "
24+ if [ -n " $TMUX_POWERLINE_SEG_TIME_TZ " ]; then
25+ TZ=" $TMUX_POWERLINE_SEG_TIME_TZ " date +" $TMUX_POWERLINE_SEG_TIME_FORMAT "
26+ else
27+ date +" $TMUX_POWERLINE_SEG_TIME_FORMAT "
28+ fi
2229 return 0
2330}
You can’t perform that action at this time.
0 commit comments