01-04-2018
May not be too satisfying, but that's the documented behaviour for (
man ps)
Quote:
start_time START starting time or date of the process. Only the year will be displayed if the process was not started the same year ps was invoked, or "MmmDD" if it was not started the same day, or "HH:MM" otherwise. See also bsdstart, start, lstart, and stime.
Using e.g.
start or
bsdstart as format specifiers, it will (presumably) behave like the Unix example that you gave above.
This User Gave Thanks to RudiC For This Post:
9 More Discussions You Might Find Interesting
1. Programming
hello,
i have use only TURBO C for programming.i used to did only on windows OS. but now i am trying to program on Linux systems.so i heard about GNU C tools and compiler. i am a bit confused and i want to know a very simplified answer for it. can anybody help me. what a heck is this GNU......
... (1 Reply)
Discussion started by: vibhory2j
1 Replies
2. News, Links, Events and Announcements
i am looking forward to this one:
http://www.opensolaris.org/jive/message.jspa?messageID=11672#11672
i thought that the gentoo community would release the first opensolaris distri, but perhabs we will get a chance to try opensolaris within 1/2 hour installation and not 12 hours "gentoo-stage_1"... (2 Replies)
Discussion started by: pressy
2 Replies
3. HP-UX
Hi everyone,
I urgently need to install all GNU tools for HP-UX 11.23. Is there somewhere i can get the whole package as opposed to download each of them separate.
I'm really stuck, i need them especially gcc.
kindly assist. (2 Replies)
Discussion started by: dowell
2 Replies
4. UNIX for Advanced & Expert Users
Hello,
One of the things I like about screen is that it has a scrollback buffer, which if you go into the copy mode, will let you go back for a specified number of line. Is there a way to extend the number of scrollback lines in screen? I've looked thoroughly online and I could not find a... (2 Replies)
Discussion started by: neked
2 Replies
5. UNIX for Advanced & Expert Users
Hi Chaps,
Does anyone know of a source of proprietary unix utilities. I often fall into the trap of testing a spot of code on my linux machine, posting the answer in the forums and then realise that the solution may only work with the GNU utils that I use, and not standard posix ones (if there are... (4 Replies)
Discussion started by: wempy
4 Replies
6. BSD
Is anyone using or planning to use GNU BSD in production yet? I'd like to hear experiences. (Debian GNU/NetBSD) (8 Replies)
Discussion started by: vpsville
8 Replies
7. AIX
Hi, We are running 64-bit AIX 6.1. I have gcc 4.2.0 on our system. I'd like to get the latest copy of GNU findutils on the server. From what I see, I have two basic options: 1) download source code and compile using gcc or 2) download rpm and install. Would someone please point me in the right... (1 Reply)
Discussion started by: Eben Yong
1 Replies
8. Debian
I wish to be able to print a barcode .5 inches from top of the page and centered.
I generate the barcode -
yes 12345 | head -84 | barcode -p 5x5.0cm -umm -e CODE39 > test.ps;
and print -
lpr -o media=letter -#1 -P LJ1012 /var/www/test.ps -o page-top=33 -o page-bottom=44 -o... (1 Reply)
Discussion started by: Meow613
1 Replies
9. Shell Programming and Scripting
I'm just learning Regex and while testing my understanding I received some unexpected results.
I created example.txt with the text "abcddd". Running the command
grep --color 'd' example.txt
I received the results:
"abcddd" with the first and second letter d highlighted in red.
So... (1 Reply)
Discussion started by: rthomas529
1 Replies
LEARN ABOUT PHP
easter_date
EASTER_DATE(3) 1 EASTER_DATE(3)
easter_date - Get Unix timestamp for midnight on Easter of a given year
SYNOPSIS
int easter_date ([int $year = date("Y")])
DESCRIPTION
Returns the Unix timestamp corresponding to midnight on Easter of the given year.
Warning
This function will generate a warning if the year is outside of the range for Unix timestamps (i.e. before 1970 or after 2037).
The date of Easter Day was defined by the Council of Nicaea in AD325 as the Sunday after the first full moon which falls on or after the
Spring Equinox. The Equinox is assumed to always fall on 21st March, so the calculation reduces to determining the date of the full moon
and the date of the following Sunday. The algorithm used here was introduced around the year 532 by Dionysius Exiguus. Under the Julian
Calendar (for years before 1753) a simple 19-year cycle is used to track the phases of the Moon. Under the Gregorian Calendar (for years
after 1753 - devised by Clavius and Lilius, and introduced by Pope Gregory XIII in October 1582, and into Britain and its then colonies in
September 1752) two correction factors are added to make the cycle more accurate.
PARAMETERS
o $year
- The year as a number between 1970 an 2037. If omitted, defaults to the current year according to the local time.
RETURN VALUES
The easter date as a unix timestamp.
EXAMPLES
Example #1
easter_date(3) example
<?php
echo date("M-d-Y", easter_date(1999)); // Apr-04-1999
echo date("M-d-Y", easter_date(2000)); // Apr-23-2000
echo date("M-d-Y", easter_date(2001)); // Apr-15-2001
?>
NOTES
Note
easter_date(3) relies on your system's C library time functions, rather than using PHP's internal date and time functions. As a con-
sequence, easter_date(3) uses the TZ environment variable to determine the time zone it should operate in, rather than using PHP's
default time zone, which may result in unexpected behaviour when using this function in conjunction with other date functions in
PHP.
As a workaround, you can use the easter_days(3) with DateTime and DateInterval to calculate the start of Easter in your PHP time
zone as follows:
<?php
function get_easter_datetime($year) {
$base = new DateTime("$year-03-21");
$days = easter_days($year);
return $base->add(new DateInterval("P{$days}D"));
}
foreach (range(2012, 2015) as $year) {
printf("Easter in %d is on %s
",
$year,
get_easter_datetime($year)->format('F j'));
}
?>
The above example will output:
Easter in 2012 is on April 8
Easter in 2013 is on March 31
Easter in 2014 is on April 20
Easter in 2015 is on April 5
SEE ALSO
easter_days(3) for calculating Easter before 1970 or after 2037 .
PHP Documentation Group EASTER_DATE(3)