Perl-Frage.
Dietmar Goldbeck
dietmar.goldbeck at acm.org
Sat Jun 17 00:41:15 CEST 2000
On Fri, Jun 16, 2000 at 11:29:55PM +0200, Cord Beermann wrote:
> Hallo.
>
> Ich will Daten der Form
>
> 2000-05-21 10:00:22
>
> in UNIX-Epoch umrechnen.
>
> gibts da ne nette Funktion fuer?
>
Aus man 3 POSIX:
mktime Convert date/time info to a calendar time.
Synopsis:
mktime(sec, min, hour, mday, mon, year, wday = 0, yday =
0, isdst = 0)
The month (mon), weekday (wday), and yearday
(yday) begin at zero. I.e. January is 0, not 1;
7/Nov/1998 perl 5.005, patch 03 9
POSIX(3pm) Perl Programmers Reference Guide POSIX(3pm)
Sunday is 0, not 1; January 1st is 0, not 1. The
year (year) is given in years since 1900. I.e.
The year 1995 is 95; the year 2001 is 101.
Consult your system's mktime() manpage for details
about these and the other arguments.
Calendar time for December 12, 1995, at 10:30 am.
$time_t = POSIX::mktime( 0, 30, 10, 12, 11, 95 );
print "Date = ", POSIX::ctime($time_t);
Returns undef on failure.
--
Alles Gute / best wishes
Dietmar Goldbeck E-Mail: dietmar.goldbeck at acm.org
Reporter (to Mahatma Gandhi): Mr Gandhi, what do you think of Western
Civilization? Gandhi: I think it would be a good idea.
-
Hinweise zur Benutzung dieser (und anderer Mailing-Listen) bitte beachten:
--> http://lug-owl.de/mailinglist_hints.html <--
More information about the Linux
mailing list