Skip to content
Advertisement

Tag: timestamp

Convert timestamp to date results in time out of range error

I`m trying to convert a timestamp to an ISO8601 datetime-string. E.g. The timestamp is fairly long, with nanoseconds precision, and when I use the full timestamp it returns the following error: date: time ‘1606982602015489365’ is out of range The expected result should be: 2020-12-03T09:03:22,015489300+01:00 When I cut the timestamp to this: 1606982612 the error is gone but I loose information!

Rounding of the millisecond part in Linux datetime

So I have the date format like this : 2019-10-19 23:55:42.797 and I want the millisecond part to be round of into the second so the output should look something like this: 2019-10-19 23:55:43 I have tried date -d “2019-10-19 23:55:42.797” “+%Y-%m-%d %H:%M:%S” but it’s giving me output like 2019-10-19 23:55:42 How should I do this in Linux bash shell?

Append date to a filename in linux

I want add the date next to a filename (“somefile.txt”). For example: somefile_DDMMYYYYHHMMSS.txt Maybe a script will do or some command in the terminal window. I’m using Linux. Thanks in advance. Answer Something like can do the work:

How To Use Gregorian Timestamp In Curl String

I’m trying to work with a curl request and the following string: I’ve been working with the documentation quite a bit, so I know that brackets are not needed. Unfortunately, the only information I have is to us “Gregorian Timestamp” which I haven’t found a lot of documentation on. I have tried a number of different combinations. Using timestamps for

Issue with HH date time format

Need help to identify where is the issue, whether it is a java issue or linux box or something else. My app is running on linux weblogic, app is generating some kind of .tar files on linux with datetimestamp in filename. I am using below snippet to get current time to prepare filename: File format: SA_PART_YYYYMMDD-HHMMSS_sequence.tar below are files from

Advertisement