Sponsored Content
Top Forums UNIX for Dummies Questions & Answers display the timestamp of a server UNIX Post 5240 by nicolas on Thursday 9th of August 2001 05:28:45 AM
Old 08-09-2001
Question display the timestamp of a server UNIX

I can't find the command shell UNIX to display the timestamp of the current date.
It's not an option of the commande date.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

display free space on a unix server

I need to display the amount space avalible on a unix server in an html webpage, which will automatically update every hour. I am able to do so using a javascript in a windows based server. How would i go about doing this in a unix server. Any help, suggestions, anything would be great. thanks. (3 Replies)
Discussion started by: davwel
3 Replies

2. Shell Programming and Scripting

Find files older then today & display with timestamp info

Small query- I want to do some operation on all the files older then today. Before I do that operation, i want to verify if the command works properly or not. Surprisingly, the command below returns me file, which are created today - find /mrk_archive/PG/ftp/incomming/gbs/2008 -type f... (2 Replies)
Discussion started by: kedar.mehta
2 Replies

3. UNIX for Advanced & Expert Users

ls -l timestamp display format

The time stamp format using "ls -l" is either mmm dd hh:mm or mmm dd yyyy. For later case, how can I know the hh:mm as well. Thanks. (3 Replies)
Discussion started by: pok.fung
3 Replies

4. Shell Programming and Scripting

preserving the timestamp of a file when copied from remote server to local server using ftp

Hi, I need to copy few files from remote server to local server. I write a shell script to connect to the remote server using ftp and go to that path. Now i need to copy those files in the remote directory to my local server with the timestamp of all those files shouldnt be changed. ... (5 Replies)
Discussion started by: arunkumarmc
5 Replies

5. UNIX for Advanced & Expert Users

How to copy a file from remote server and preserve timestamp

Hi How to copy a file from remote server and preserve timestamp. Please not, i have to pass username and password to connect to the remote server in the shell script. Can this be achieved with simple ftp ? are there any options in ftp ? Thanks (4 Replies)
Discussion started by: skumar75
4 Replies

6. Shell Programming and Scripting

Display .bash_history with timestamp using script

Hi would like to ask if there is anyway to display .bash_history with timestamp using shell script? i know that you should use history command with HISTTIMEFORMAT="%d/%m/%y %T " to display it in terminal but it does not work when i use it on shell script. It seem that you can't run history... (1 Reply)
Discussion started by: pikamon
1 Replies

7. UNIX for Dummies Questions & Answers

Display files based on particular file timestamp

Hi, I have requirement to list out files that are created after particular file. ex. I have below files in my directory. I want to display files created after /dirdat/CG1/cg004440 file. ./dirdat/CG1/cg004438 09/07/14 0:44:05 ./dirdat/CG1/cg004439 09/07/14 6:01:48 ... (3 Replies)
Discussion started by: tmalik79
3 Replies

8. Shell Programming and Scripting

To check timestamp in logfile and display lines upto 3 hours before current timestamp

Hi Friends, I have the following logfile. Currently time in india is 07/31/2014 12:33:34 and i have the following content in logfile. I want to display only those entries which contain string 'Exception' within last 3 hours. In this case, it would be the last line only I can get the... (12 Replies)
Discussion started by: srkmish
12 Replies

9. Shell Programming and Scripting

AIX : Need to convert UNIX Timestamp to normal timestamp

Hello , I am working on AIX. I have to convert Unix timestamp to normal timestamp. Below is the file. The Unix timestamp will always be preceded by EFFECTIVE_TIME as first field as shown and there could be multiple EFFECTIVE_TIME in the file : 3.txt Contents of... (6 Replies)
Discussion started by: rahul2662
6 Replies

10. Shell Programming and Scripting

Display lines between timestamp

Hi Gurus, I have a software which logs event in the log file and it has become to big to search into it. I want to display all the lines from the log files between <Jul 21, 2016 3:30:37 PM BST> to <Jul 21, 2016 3:45:37 PM BST> that is 15 min data . Please help Use code tags, thanks. (10 Replies)
Discussion started by: guddu_12
10 Replies
DATETIME.MODIFY(3)							 1							DATETIME.MODIFY(3)

DateTime::modify - Alters the timestamp

       Object oriented style

SYNOPSIS
public DateTime DateTime::modify (string $modify) DESCRIPTION
Procedural style DateTime date_modify (DateTime $object, string $modify) Alter the timestamp of a DateTime object by incrementing or decrementing in a format accepted by strtotime(3). PARAMETERS
o $object -Procedural style only: A DateTime object returned by date_create(3). The function modifies this object. o $modify -A date/time string. Valid formats are explained in Date and Time Formats. RETURN VALUES
Returns the DateTime object for method chaining or FALSE on failure. CHANGELOG
+--------+---------------------------------------------------+ |Version | | | | | | | Description | | | | +--------+---------------------------------------------------+ | 5.3.6 | | | | | | | Absolute date/time statements now take effect. | | | Previously, only relative parts were used. | | | | | 5.3.0 | | | | | | | Changed the return value on success from NULL to | | | DateTime. | | | | +--------+---------------------------------------------------+ EXAMPLES
Example #1 DateTime.modify(3) example Object oriented style <?php $date = new DateTime('2006-12-12'); $date->modify('+1 day'); echo $date->format('Y-m-d'); ?> Procedural style <?php $date = date_create('2006-12-12'); date_modify($date, '+1 day'); echo date_format($date, 'Y-m-d'); ?> The above examples will output: 2006-12-13 Example #2 Beware when adding or subtracting months <?php $date = new DateTime('2000-12-31'); $date->modify('+1 month'); echo $date->format('Y-m-d') . " "; $date->modify('+1 month'); echo $date->format('Y-m-d') . " "; ?> The above example will output: 2001-01-31 2001-03-03 SEE ALSO
strtotime(3), DateTime.add(3), DateTime.sub(3), DateTime.setDate(3), DateTime.setISODate(3), DateTime.setTime(3), DateTime.setTimes- tamp(3). PHP Documentation Group DATETIME.MODIFY(3)
All times are GMT -4. The time now is 04:00 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy