Display week day in i3 status bar [closed] - i3

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 4 years ago.
Improve this question
I want to display the current week day (e. g. Monday) in the i3 status bar.
My current status bar has the following format:27.06.2016 18:00:00.
I want to achieve a format like this: Monday, 27.06.2016 18:00:00.
The corresponding config in i3status.conf looks like this:
tztime local {
format = "%d.%m.%Y %H:%M:%S"
}
I am running i3 on a Debian Linux.
Does anybody have a solution on how to display the week day in the status bar? The man page offers no solution, neither did an internet search...

tztime local {
format = "%A, %d.%m.%Y %H:%M:%S"
}
As for the manpage not offering a solution:
From the i3status manpage:
TzTime
Outputs the current time in the given timezone. If no timezone is given, local time will be used. See strftime(3) for details on the format string.
So looking up man 3 strftime you should find
%A The full name of the day of the week according to the current locale.

Related

TEXT -- disambiguate "m" [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
Is there a way to figure out when "m" is month and when it is minute in Excel's TEXT(...) function? For example, the simplest example is m/d (month/day) as opposed to m:s (minute:second). How is this disambiguated in Excel?
Reference: https://support.microsoft.com/en-us/office/text-function-20d5ac4d-7b94-49fd-bb38-93d29371225c
There is a note clarifying this the document Number format codes, at the start of the section Dates and times
Important: If you use the "m" or "mm" code immediately after the "h" or "hh" code (for hours) or immediately before the "ss" code (for seconds), Excel displays minutes instead of the month.
Is there a way to know...
imho : if m is alone OR is there with d or y, its month. ,if m is there with s or h, its minute.

Linux/Debian equivalent of macOS's date -jf, set source date format? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
I have a date in the format of 201908270700 but need to change it to yyyy/mm/dd hh:mm, when googling I find lots of solutions to do this with the macOS command line, but not many for linux, at least not a simple solution.
On macOS you can do date -jf "%Y%m%d%H%M" "201908270700" "+%Y/%m/%d %H:%M" and it'll return 2019/08/27 07:00, but looking at the GNU date man page, there is no equivalent option on Linux, or is there?
With the date in a variable, it's easy to format into a form the GNU coreutils date(1) understands:
$ dt=201908270700
$ date -d"${dt:0:8} ${dt:8:4}" "+%Y/%m/%d %H:%M"
2019/08/27 07:00
This splits the date and time up into separate elements, which can then be parsed according to the rules for pure numbers in the coreutils documentation.

In Linux CLI, how can I list directory contents that show 12 hour mode for entries? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 3 years ago.
Improve this question
In Linux how I can
ls - list directory contents,
That shows 12 hour mode PM:AM
man ls tells you that ls has a --time-style= option, which allows to specify a format as used in the date command. The man page for date shows various options, including %I for hour (0 - 12) and %p for the AM/PM indicator.
ls -l --time-style=+%D\ %I:%m\ %p
should do what you want.

How can I get the current date and time in the terminal and set a custom command in the terminal for it? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I have to check the time in a Linux terminal.
What is the command for getting date and time in a Linux terminal?
Is there a way in which we can set a custom function?
The command is date
To customise the output there are a myriad of options available, see date --help for a list.
For example, date '+%A %W %Y %X' gives Tuesday 34 2013 08:04:22 which is the name of the day of the week, the week number, the year and the time.
You can use date to get time and date of a day:
[pengyu#GLaDOS ~]$date
Tue Aug 27 15:01:27 CST 2013
Also hwclock would do:
[pengyu#GLaDOS ~]$hwclock
Tue 27 Aug 2013 03:01:29 PM CST -0.516080 seconds
For customized output, you can either redirect the output of date to something like awk, or write your own program to do that.
Remember to put your own executable scripts/binary into your PATH (e.g. /usr/bin) to make it invokable anywhere.

Set timezone on embedded Linux system [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I have a small uCLinux system, how do I set the timezone on uCLinux?
Thanks,
Fred
If the system uses BusyBox, add this command to /etc/inittab:
setenv TZ PDT
If not using busybox, just set an environment variable in your application's initialization code:
putenv ("TZ=PDT");
I have chosen US Pacific Daylight Time for these examples, but maybe that does not apply to you.
I export TZ=PDT (my system doesn't have setenv), and TZ is definitely being set and is available to the subsequent script that runs the ntpclient. The log entries in /var/log/messages are all in UTC, as is the output of the date command.
export TZ=PST8PDT
Edit $HOME/.profile or $HOME/.bash_profile appending the following line:
TZ='Asia/Kolkata'; export TZ
Then log out and log in again.

Resources