Answer by F. Hauri - Give Up GitHub for Convert Unix timestamp to a date string
3 remarks:.1 about bashAs this question is tagged bash and no answer here address printfbashism:Syntax: printf '%(fmt)T' $UNIXEPOCHUnder bash, from V4.2, (Feb 2011), The printf builtin has a %(fmt)T...
View ArticleAnswer by Itachi for Convert Unix timestamp to a date string
Python:python -c "from datetime import datetime; print(datetime.fromtimestamp($TIMESTAMP))"
View ArticleAnswer by Dangelov for Convert Unix timestamp to a date string
Put the following in your ~/.bashrc :function unixts() { date -d "@$1"; }Example usage:$ unixts 1551276383Wed Feb 27 14:06:23 GMT 2019
View ArticleAnswer by denmojo for Convert Unix timestamp to a date string
Other examples here are difficult to remember. At its simplest:date -r 1305712800
View ArticleAnswer by Tony Mountifield for Convert Unix timestamp to a date string
Slight correction to dabest1's answer above. Specify the timezone as UTC, not GMT:$ date -d '1970-01-01 1416275583 sec GMT'Tue Nov 18 00:53:03 GMT 2014$ date -d '1970-01-01 1416275583 sec UTC'Tue Nov...
View ArticleAnswer by Greg A. Woods for Convert Unix timestamp to a date string
As @TomMcKenzie says in a comment to another answer, date -r 123456789 is arguably a more common (i.e. more widely implemented) simple solution for times given as seconds since the Unix Epoch, but...
View ArticleAnswer by dabest1 for Convert Unix timestamp to a date string
This solution works with versions of date which do not support date -d @. It does not require AWK or other commands. A Unix timestamp is the number of seconds since Jan 1, 1970, UTC so it is important...
View ArticleAnswer by William Pursell for Convert Unix timestamp to a date string
The standard Perl solution is:echo $TIMESTAMP | perl -nE 'say scalar gmtime $_'(or localtime, if preferred)
View ArticleAnswer by qbi for Convert Unix timestamp to a date string
If you find the notation awkward, maybe the -R-option does help. It outpouts the date in RFC 2822 format. So you won't need all those identifiers: date -d @1278999698 -R. Another possibility is to...
View ArticleAnswer by qbi for Convert Unix timestamp to a date string
date -d @1278999698 +'%Y-%m-%d %H:%M:%S'Where the number behind @ is the number in seconds
View ArticleAnswer by John Kugelman for Convert Unix timestamp to a date string
With date from GNU coreutils you can do:date -d "@$TIMESTAMP"# date -d @0Wed Dec 31 19:00:00 EST 1969(From: BASH: Convert Unix Timestamp to a Date)On OS X, use date -r.date -r...
View ArticleAnswer by Sjoerd for Convert Unix timestamp to a date string
awk 'BEGIN { print strftime("%c", 1271603087); }'
View ArticleConvert Unix timestamp to a date string
Is there a quick, one-liner way to convert a Unix timestamp to a date from the Unix command line?date might work, except it's rather awkward to specify each element (month, day, year, hour, etc.), and...
View Article
More Pages to Explore .....