Questions tagged [date]

Questions regarding NTP(network time protocol), cron(task scheduler) and the display of date and time in the panels and elsewhere in Ubuntu. This is an overly general tag, avoid using it if possible.

Filter by
Sorted by
Tagged with
0
votes
1answer
33 views

Command date execution

I'm trying to execute this command date +'%-4.4h %2.1d %H:%M' however the output is not correct: %-4.4h %2.1d 12:50 I believe that there is something wrong either with my ubuntu terminal or the ...
0
votes
0answers
13 views

Create a window that displays just the date, just like xarclock, except for the date

I want to create a window that simply displays the date, with as many of these requirements as possible - a -geom option - a -bg and -fg option to specify background and foreground options - an ...
2
votes
1answer
89 views

Using datetime expression in alias

I have an application with logging, and I usually watch it with tail -f /var/myapp/logs/2021-04-20/main-log-2021-04-20.log How can I create an alias for this command and execute it with current date?
1
vote
0answers
19 views

how to make the status bar to show both georgian date and persian(shamsi) date?

Is there a way to make the status bar on the top the screen to show both georgian and persian date? It would be really handy
0
votes
1answer
39 views

accessing the GUI date/time setter programmatically

I'm maintaining a turnkey application. The customer has requested a date/time setter which would allow the user to set time, date, and time zone. (Evidently, some of our units will be going into ...
0
votes
1answer
74 views

Update date and disable automatic updates

Ubuntu 20.04 running in VirtualBox with MacOS host Using python rather than a shell script. For linux commands running in a sub-process. Date is updated, however not long after date/time is reset ...
0
votes
0answers
38 views

Display of dates/times in ISO 8601 format in Files (Nautilus) [duplicate]

Is there a way to get the file manager Files (Nautilus?) and other applications under Ubuntu to display the date and time in standard ISO 8601 format, instead of the "comfortable" style, ...
0
votes
0answers
36 views

Why doesn't date parse it's default output format

I've found an old script now fails under Ubuntu 20.04.1(LTS) because the default locale date format generated by 'date' fails to parse in 'date': user@ubuntu-server-20:~$ date --date="`date`"...
1
vote
1answer
419 views

NTP port is blocked. How to sync time? - 18.04

My server provider blocked NTP port because they said there was an NTP attack. Now I cannot sync date and time in my ubuntu 18.04 server. How can I sync time? This is ntpdate -q 0.pool.ntp.org result: ...
0
votes
0answers
56 views

How to find and move files between certain dates? [duplicate]

I have two repertories named 'test1' and 'test2' with multiples files with .jpg or .mp3 extensions. I want to find and move all files between 22-juin-2016 and 21-September-2018 to a new folder called '...
1
vote
0answers
50 views

How to correct Modified Date in Files/Nautilus

How do I get Nautilus/Files to display the correct modified date? I just noticed that when my camera's RAW files, the modified date displays a date 31 days in the future! Please refer to the ...
0
votes
1answer
72 views

Automatic date and time doesn't work

The automatic date and time feature doesn't work even after enabling it. I have dual boot Ubuntu alongside Windows 10 and every time I switch to windows and comeback to Ubuntu, the time is changed and ...
0
votes
0answers
79 views

Automatic Date & Time

Today something strange is happening. I'm running Ubuntu 20.04 with the latest updates, and the standard GNOME UI. My time suddenly started going wrong, and it seems to be due to the Automatic Date &...
0
votes
0answers
34 views

18.04LTS: Most recent restore date not offered

How do I restore with the most recent backup? I restored the saved data to another computer. I needed some files so I restored using the most recent backup point offered: 5/2020. All was successful. ...
2
votes
1answer
388 views

Can not change date/time format

I am using UM 20.04 on a persistent install on a pendrive. When I use dconf-editor and change the custom time format, nothing changes. Same thing happens on a HD installation. Why did Ubuntu Mate make ...
0
votes
0answers
89 views

'date' Command Failure in Ubuntu 18.04 LTS

I am getting errors on the date command if I use the timezone designation stored in the system: $ date -d "2019-12-10 23:26:30 EDT +4 hours" date: invalid date ‘2019-12-10 23:26:30 EDT +4 ...
2
votes
2answers
446 views

Ubuntu on Raspberry Pi 4 Internet/Date Issues

I have installed Ubuntu Server 20.04 on a Raspberry Pi 4 4GB model. It's meant to be a media/file server for my parents. I set everything up on it at my house and it works great. However, when I hook ...
2
votes
2answers
423 views

Subtracting dates formats in bash

I am trying to create a countdown - most likely the hard way. I have it setup like this: #! /bin/bash #When to execute command execute=$(date +"%T" -d "22:30:00") #Current time ...
0
votes
1answer
47 views

Configuring date command

Linux noob here! My PC runs Lubuntu 18.04.4 LTS (32-bit). The other day, I learnt about the date command. It's typically not useful for me because I could just look a little above my screen at the ...
3
votes
1answer
203 views

How can I set LibreOffice to use ISO 8601 date format?

I need LibreOffice to use ISO 8601 date format, but it falsely shows MM/DD/YY when it should correctly be showing YYYY-MM-DD. To reproduce I do: Open a new LibreOffice document and choose Insert->...
1
vote
1answer
714 views

Changing date format in lock screen [duplicate]

I want to change the date format from what I chose in the Ubuntu installation, and it works by going to Region & Language and selecting the format that I want, but when I log out of the user, the ...
0
votes
1answer
200 views

How to set date command line output defaults to 24h format?

My XFCE shows correct time: But when running date command it defaults to 12h format? already tried solution from this and this question but still the same, I'm using en_CA.UTF-8 btw.
0
votes
1answer
220 views

Command inside another command - Bash

Note I know how to run a simple command inside another command, but in my case is special. My command contain ". (date "+%Y-%m-%d") Goal I need to display my log via 1 command Steps If ...
0
votes
0answers
20 views

Display date number with Sun = 1 through to Sat = 7?

I use LXDE and wanted to play around a little with the digital clock widget so that it simply displays the day of the week as a number. I am based in Israel where the week starts on a Sunday. So it ...
0
votes
1answer
21 views

Add values to one string

I would to like to copy one file on a certain day at 2:30 using crontab Assume I have a file called 200516.txt I want to copy on May, 16th 2020 -> date +%y -- 20 -> date +%m -- 05 -> date +%d -- 16 -...
3
votes
1answer
375 views

Change all dates of all files in directory

I have a directory with the following files: $ ls -l -rw-r--r-- 1 myusername myusername 4129128 Aug 7 2013 A-32.JPG -rw-r--r-- 1 myusername myusername 4106876 Aug 7 2013 A-37.JPG -rw-r--r-...
1
vote
1answer
303 views

How Do I Change My Systemwide Date and Time Format to ISO 8601 YYYY-MM-DD hh:mm:ss Format on Ubuntu 18.04.4 LTS?

I am using Ubuntu 18.04.4 LTS with GNOME DE and I want to change my systemwide date and time format to ISO 8601 format, specifically YYYY-MM-DD for dates and hh:mm:ss for times. How can I do this?
1
vote
0answers
360 views

How do i get GRUB to display environment variables in label components?

So, I've been trying without much success to get the current date + time to display on the boot menu. I read here that loading the datehook module would help, as it added several new variables for ...
29
votes
3answers
6k views

Why can't I change system time to less than 1970?

I wanted to check how a certain software reacts when I change my computer's date. But I could not change the system time to anything less than 1970. Why is that?
-2
votes
2answers
189 views

ubuntu has a different time than the system time [closed]

My Ubuntu 18.04.3 date/time is 3:10 AM Feb 26, 2020. However the BIOS date/time is 8:10 AM Feb 25, 2020. If I correct the date/time in Ubuntu, it changes it on the BIOS, and viceversa. How can I solve ...
0
votes
2answers
194 views

Is it possible to let date return its result in ISO 8601 format by default

I want to change the behavior of the command date (possibly by setting some proper environment variable) such that it returns its output as if it was invoked as date --iso-8601=seconds Is that ...
0
votes
1answer
722 views

Bash script automatitation name change using date

I'm new to the shell/bash area. I've created this little script to change a name using the date command. The idea is to get something like this 1.txt=>2020-02.txt And it works, but I get the ...
2
votes
0answers
66 views

Ubuntu on my new Chromebook sets the time 20+ years in future

After 3-4 days since LAMP stack installation on the Chrome book, the time went to future. I don't really mind it, but MySQL community server doesn't work with years higher than 2038. Sync over ...
0
votes
1answer
37 views

How do I use a shell script to keep only the last populated value for each month in a CSV?

I have a csv file which gets updated by a cron daily and looks something like this: Date,Value 01/11/2019,123 02/11/2019,456 03/11/2019,789 ... 31/01/2020,123 01/02/2020,456 02/02/2020,789 03/02/2020,...
1
vote
2answers
487 views

How do I get date and time stored in a bash variable to update when echoing it?

I have this script: date_time=`date "+%Y%m%d%H%M%S"` script_name=`basename "$0"` echo $date_time, $script_name sleep 2 echo $date_time, $script_name exit 1 It shows me this (same time). ...
0
votes
2answers
289 views

How to calculate average of 2nd field from files?

I have a file and it consists of two fields. The first field format is "%FT%T". Sample data: 2019-01-01T00:00:00 4.8 2019-01-01T01:00:00 5.1 2019-01-01T02:00:00 5.4 2019-01-01T03:00:00 5.7 2019-...
1
vote
2answers
158 views

How to manipulate specific fields?

I have a csv file. Its line numbers are max 25. Headings are time(UTC)(1st field), latitude(2nd field), longitude(3rd field), depth (4th field), mag(5th field), place (14th field) and so forth ...
0
votes
1answer
111 views

date command output format

I have just installed ubuntu server 19.10. When I enter the date command I get the following output Sun 10 Nov 2019 05:16:05 PM AEDT My old server running 18.04 gives this output Sun Nov 10 17:...
1
vote
1answer
420 views

How do I change the “Last-Modified” time format from the curl-head standard output?

The following command can get the modification time of the remote file, how to modify the output time format? # curl -sI https://sgp-ping.vultr.com/vultr.com.100MB.bin | grep Last-Modified | cut -c16-...
0
votes
1answer
133 views

Time runs out for Linux in 2038, what then?

Many people know Linux time is stored in Seconds since 1970. This time field explodes around the year 2032 and can no longer be used. I'm considering writing a new app that tracks the time a file was ...
2
votes
0answers
35 views

Date format isn't standardised across GNOME 3 system apps

Having just enabled the Livepatch feature, I notice that it uses yet another non-standard date format. The following system apps use these given date & time formats: Settings > Date & Time ...
0
votes
1answer
47 views

How to remove decimal date from a text file?

I have a text file where date many times appear in two formats e.g. 01.01.10 or 01.01.2010 Is there any command that will remove all the dates from a text file? Any help would be appreciated.
0
votes
1answer
336 views

Printing next working day in bash given list of holidays

I want to generate a simple file dates.txt containing the following two dates: Todays_trading_Date Next_Trading_Date Trading days are only weekdays which do not fall on a given list of holidays ...
0
votes
1answer
71 views

Getting wrong output?

I have a bash script, where it will go inside a folder and extract the time stamping by matching the key-string. And then it will convert the date and time stamping s into standard format and perform ...
0
votes
1answer
65 views

How do I set Nautilus/Files view preferences?

Under each file icon in the file manager, I want to see its Name, Date, and Size. (I used to have these, but have lost these since doing a reinstall today). At the present I only see the file's name. ...
1
vote
0answers
3k views

Enable/disable Daylight Savings Time through command line

Note: By "Disable" daylight savings time, I mean for the system clock to ignore any time changes for daylight savings time (ie, if DST is disabled, then the clock will not "spring forward" an hour in ...
0
votes
1answer
1k views

Should I reboot after set new timezone using timedatectl

I am on a 1604 system with timezone A, after I set the timezone to B using timedatectl set-timezone B, everything work fine.('timedatectl status' is B, 'date' command showing the right time, file time ...
2
votes
1answer
282 views

Showing the date on the system tray with the metacity flashback (ubuntu 18.04)

I'm clarifying "with metacity" because I assume that's what is disqualifying the advice I found on multiple posts. I had this fixed back on ubuntu 16 with a different pc but I can't for the life of me ...
2
votes
1answer
2k views

Compare two dates in the shell

I am trying to compare two dates in a shell script but I always get a wrong value. This is the code I am using: currenttime=$(date +%H%M%S); peak_time=$(date -d "$peak_time" '+%H%M%S'); num1=$(($...
0
votes
1answer
41 views

'date' on a command issued before midnight but ending after midnight. Today or tomorrow date?

I will be launching today a zip command naming the new file with the current date (date+\%Y\-%m\-%d.zip). The compression will probably end after midnight. Do you think the zip will be named with ...

1
2 3 4 5 6