Linux date timezone [closed] - linux

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 have a question about timezone and the output of the linux date command. Is it standard or daylight? date +%Z returns EDT.
Is there a way to change the timezone returned by date +%Z from EDT to EST?

The timezone information is stored in the $TZ environment variable.
TZ=EST date +%Z
But why? If you need the string EST in the output, just echo EST :-)

Related

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.

How to change the created and last modified date of a file to present time in Linux Shell? [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 6 years ago.
Improve this question
I am looking for a command in bash to change the last modified and created timestamp to be changed to present time.
How do I do it using shell command/script?
Thanks!
touch will update the access and modification times (or only one of the two with -a or -m respectively).

Unable to set just year with Linux date command [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
For some reason I fail to update year only using date command
date
Tue Mar 4 20:15:42 IST 2014
date '+%Y' -s '2013'
date
Tue Mar 4 20:13:01 IST 2014
I tried it on both RedHat and Ubuntu...
NTP is not running...
Apparently to change the date you have to use the complete setting syntax.
date --set="YYYYmmdd HH:MM"
Here is a way to achieve your demand :
date --set="$(date +'2013%m%d %H:%M')"
This way you maintain month, day, hour and minute and change year.

User Wise TIME ZONE possible in Linux Red HAT [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
Any possibility to changes user wise time zone in Linux.
Which user (a web client, or someone remotely logged thru ssh)? He could set the TZ environment variable, perhaps by adding a line like
export TZ='Europe/Paris'
in his ~/.bashrc file if bash is his login shell.
See environ(7) and tzselect(8)

CRON to Run on Weekdays [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 cronjob set to run as
3 6 10 * 1-6 wget'http://...'
How will this execute ? I intend to run it at 6:03 AM on the 10th Of Every Month expect on Sundays.
I am confused as it ran on Saturday, even when the date was not 10th.
Please advise if there is an error with my command or could it be something else ?
The way you have this setup, your command will execute EITHER when the day of the week is 1-6 OR when the day of month is 10.

Resources