Questions tagged [date]
the "date" tag is used to classify questions about date/calendar/time manipulation, visualisation, conversion... on Unix-like systems.
1,194 questions
-3 votes
0 answers
72 views
Why do I get 35 for the year 2023 on a buildroot Linux machine?
I just asked the system datetime to a Buildroot Linux machine. I got the result in the form of a byte array. All values seemed ok (B0 for the hours, B1 for the minutes, ..., up to B5 for the year), ...
3 votes
2 answers
164 views
Get all log lines from last minute with busybox
I have an openwrt router (so no journalctl and only busybox commands), and would like to extract the logs from the last minute. The logs are like this: Tue Jun 3 11:06:43 2025 authpriv.info dropbear[...
0 votes
1 answer
101 views
What output does --iso-8601=ns provide with the date command?
This command will output the following: date --iso-8601=ns 2025-04-04T12:10:16,045431370+02:00 According to man date the ns is documented as follows: -I[FMT], --iso-8601[=FMT] output date/time in ...
3 votes
2 answers
413 views
How to compare two dates in formats %Y-%m-%dT%H:%M:%S.%3NZ and %-m/%-d/%Y %-I:%M %p
This is a bash date conversion/comparison question. How do I compare dates $d1 and $d2 below where: $d1 has format %-m/%-d/%Y %-I:%M %p (US-style %p with AM/PM) and $d2 has format %Y-%m-%dT%H:%M:%S.%...
0 votes
3 answers
264 views
How to show seconds of last modified date when using sftp command?
When I use WinSCP to access my SFTP server, it shows me the last modified (changed) date including seconds. If I use sftp on Linux and run ls -l, it only shows the hours and minutes, but no seconds. ...
1 vote
2 answers
90 views
Can any Linux date command print the current time in a time zone other than the current?
I want the just the current time in HH:MM (%R or %H:%M in strftime) in a time zone other the my system's.s Is this possible with just the date command, and if so, how?
0 votes
1 answer
63 views
adding alternate date (e.g., julian) to Gnome panel
Is there an extension which would allow me to add an additional date (Julian) to the Gnome panel?
4 votes
2 answers
423 views
Invalid date when setting one computer's clock from another
I have the following code in a Bash script, which takes the current date/time and sets it via SSH on a target computer: ssh <user>@<target> "date --set '$(date)'" This was ...