04-29-2009
take a look at the man page for 'date'. You will be able to construct the date field of the filename, and then with that value you will be able to use the script above.
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
If I want to access unix box via VPN tunnel,from windows box.
What sould I configure on the windows client PC, and what should I enable on the Unix Server box ?
I am using Solaris V10 intel platform, and I am using windows XP, and 2003 for client (0 Replies)
Discussion started by: zillah
0 Replies
2. UNIX for Advanced & Expert Users
Hi all,
I am generating a file on the Unix machine , now i want to FTP the same file to the NT machine.
how can i do that and the application currently upon which i am working is a JAVA based application.
I need your help.
regards
Ruchir (2 Replies)
Discussion started by: Ruchir
2 Replies
3. UNIX for Dummies Questions & Answers
Hi all,
I am new to UNIX. I have to copy a .ksh file from the production box PEDFX to test box BREMTX. Can anyone please suggest how I do this? I have CRT loaded on my system. (1 Reply)
Discussion started by: FORUM
1 Replies
4. UNIX for Dummies Questions & Answers
I am able to run the UNIX commands in a Windows box from a UNIX box through "SSH" functionality. But whenever the SSH connection is established between UNIX and Windows, password for windows box is being asked.
Is there a way to avoid asking password whenever the SSH connection is made? Can I... (1 Reply)
Discussion started by: D.kalpana
1 Replies
5. UNIX for Dummies Questions & Answers
scp file="myfile.txt" todir="user@somehost:(M:drive:/somepath/)"/
Not sure I need it to go to a specific drive on the windows box (1 Reply)
Discussion started by: xgringo
1 Replies
6. Shell Programming and Scripting
Hi
our unix admin has copied all files from one unix box to new unix box. We just need to confirm that all the file systems are copied properly. How to validate. (9 Replies)
Discussion started by: sravanreddym
9 Replies
7. UNIX for Dummies Questions & Answers
Hi I need to copy a file from the remote unix server to windows machine.
I read lot of thrad but didn't worked out.
Requesting all to please help. (2 Replies)
Discussion started by: sameerspice
2 Replies
8. Shell Programming and Scripting
Hello all !
I'm trying to write a shell script (bash) to ftp a file starting with particular name like "Latest_" that is present on a Windows box to UNIX server. Basically I want to set this script in the cron so that daily the new build that is posted on the Windows box can be downloaded to the... (2 Replies)
Discussion started by: vijayb4u83
2 Replies
9. UNIX for Dummies Questions & Answers
Hi Folks,
I am using winscp to graphiclly move the files from one unix box to another unix box , let say one unix box crediantials is (These are dummy crediantials)
xxx -->username
yyy -->password
and another unix box name is
RRR -->username
TTT -->password
NOW i need to... (4 Replies)
Discussion started by: punpun66
4 Replies
10. Shell Programming and Scripting
Hi Folks,
I have a file name abc.xml in my windows machine at the location c:\ytr\abc.xml
which I want to place at the unix box machine inside cde directory.. at the following location that is /opt/app/cde/
now the credentials of unix box are
abc345 -->(dummyid)
ftyiu88--->(dummy passwd)
... (4 Replies)
Discussion started by: punpun66
4 Replies
LEARN ABOUT PHP
datetime.settimestamp
DATETIME.SETTIMESTAMP(3) 1 DATETIME.SETTIMESTAMP(3)
DateTime::setTimestamp - Sets the date and time based on an Unix timestamp
Object oriented style
SYNOPSIS
public DateTime DateTime::setTimestamp (int $unixtimestamp)
DESCRIPTION
Procedural style
DateTime date_timestamp_set (DateTime $object, int $unixtimestamp)
Sets the date and time based on an Unix timestamp.
PARAMETERS
o $object
-Procedural style only: A DateTime object returned by date_create(3). The function modifies this object.
o $unixtimestamp
- Unix timestamp representing the date.
RETURN VALUES
Returns the DateTime object for method chaining or FALSE on failure.
EXAMPLES
Example #1
DateTime.setTimestamp(3) example
Object oriented style
<?php
$date = new DateTime();
echo $date->format('U = Y-m-d H:i:s') . "
";
$date->setTimestamp(1171502725);
echo $date->format('U = Y-m-d H:i:s') . "
";
?>
Procedural style
<?php
$date = date_create();
echo date_format($date, 'U = Y-m-d H:i:s') . "
";
date_timestamp_set($date, 1171502725);
echo date_format($date, 'U = Y-m-d H:i:s') . "
";
?>
The above examples will output something similar to:
1272508903 = 2010-04-28 22:41:43
1171502725 = 2007-02-14 20:25:25
NOTES
Using the Unix timestamp format to construct a new DateTime object is an alternative when using PHP 5.2, as shown in the example below.
Example #2
DateTime.setTimestamp(3) alternative in PHP 5.2
<?php
$ts = 1171502725;
$date = new DateTime("@$ts");
echo $date->format('U = Y-m-d H:i:s') . "
";
?>
The above example will output something similar to:
1171502725 = 2007-02-14 20:25:25
SEE ALSO
DateTime.getTimestamp(3).
PHP Documentation Group DATETIME.SETTIMESTAMP(3)