9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello All,
So I have been running into an issue with a USB Modem where if someone ends their dialin connection abruptly from the other side the modem gets stuck
and I found that the only way to fix it is to either unplug the USB Modem and plug it back in, or just reboot. I'd rather not reboot... (5 Replies)
Discussion started by: mrm5102
5 Replies
2. AIX
Does anybody know how to reset the NVRAM on a System p 520 (power 5)? (7 Replies)
Discussion started by: livehho
7 Replies
3. Solaris
Hi gurus,
I have a sun netra 240 server. I want to get to the ALOM but it always ask for login and password. Can anyone tell me how I can reset the ALOM it to default so I can be able to configure it?
Thanks lots. (2 Replies)
Discussion started by: cjashu
2 Replies
4. Solaris
while installing unix solaris I found that one of the CD's is corupted so I bring another copy of solaris CD's and type reboot instead of 'reboot cdrom' then the server goes in infinite loop of rebooting resetting??I tried to use ctrl+break but didnt work....how can I break this loop....plz help?? (4 Replies)
Discussion started by: mm00123
4 Replies
5. Shell Programming and Scripting
Hi,
Can any one provide the Unix command to reset the positional parameters?
Please see the below example where i have to pass 2 parameters to Shell1.sh.
Step1) . ./Shell1.sh 2 3
successfully executed, Then i executed(next step only) the same shell script again,this time no... (4 Replies)
Discussion started by: nmk
4 Replies
6. Shell Programming and Scripting
Hi,
I have modified the IFS variable in the K shell program and with in the program i want to reset to the default one. How do i reset the same.
e.g
in the begining of the program IFS is default
in the middle i changed it to
IFS="|"
and again i want the default value for the IFS.
... (2 Replies)
Discussion started by: vijaykrc
2 Replies
7. Solaris
Hi all,
I'm developing a script to handle the various actions involved with user admin as root:
Reset password
create a new users
change a users email address, etc
We're in the process of changing over from "telnet" to "SSH" to establish terminal sessions on our Solaris 9/10 servers.
... (2 Replies)
Discussion started by: dewets
2 Replies
8. Programming
Hi !
How to reset a variable to 0 after a reset value, say 10 using bitwise
XOR.
For example,
int cnt=0;
if(cnt<10)
cnt++;
else
cnt = 0;
How can we achieve this by using XOR only.
thanks, (1 Reply)
Discussion started by: mrgubbala
1 Replies
9. UNIX for Dummies Questions & Answers
When I type last oracle I get dates from Nov 28, 2000 all the way back to the beginning of time it seems. The 11-28-2000 entry states that Oracle is still logged in, but if you type a who, it shows only 1 entry - the currently logged in user (Me as oracle), but I logged in only minutes ago - and... (4 Replies)
Discussion started by: cuppjr
4 Replies
DATETIME.SETDATE(3) 1 DATETIME.SETDATE(3)
DateTime::setDate - Sets the date
Object oriented style
SYNOPSIS
public DateTime DateTime::setDate (int $year, int $month, int $day)
DESCRIPTION
Procedural style
DateTime date_date_set (DateTime $object, int $year, int $month, int $day)
Resets the current date of the DateTime object to a different date.
PARAMETERS
o $object
-Procedural style only: A DateTime object returned by date_create(3). The function modifies this object.
o $year
- Year of the date.
o $month
- Month of the date.
o $day
- Day of the date.
RETURN VALUES
Returns the DateTime object for method chaining or FALSE on failure.
CHANGELOG
+--------+---------------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+---------------------------------------------------+
| 5.3.0 | |
| | |
| | Changed the return value on success from NULL to |
| | DateTime. |
| | |
+--------+---------------------------------------------------+
EXAMPLES
Example #1
DateTime.setDate(3) example
Object oriented style
<?php
$date = new DateTime();
$date->setDate(2001, 2, 3);
echo $date->format('Y-m-d');
?>
Procedural style
<?php
$date = date_create();
date_date_set($date, 2001, 2, 3);
echo date_format($date, 'Y-m-d');
?>
The above examples will output:
2001-02-03
Example #2
Values exceeding ranges are added to their parent values
<?php
$date = new DateTime();
$date->setDate(2001, 2, 28);
echo $date->format('Y-m-d') . "
";
$date->setDate(2001, 2, 29);
echo $date->format('Y-m-d') . "
";
$date->setDate(2001, 14, 3);
echo $date->format('Y-m-d') . "
";
?>
The above example will output:
2001-02-28
2001-03-01
2002-02-03
SEE ALSO
DateTime.setISODate(3), DateTime.setTime(3).
PHP Documentation Group DATETIME.SETDATE(3)