Re: [LINUX:7893] Re: linux'ta 2000 sorunu ??? - EK

---------

New Message Reply About this list Date view Thread view Subject view Author view

Subject: Re: [LINUX:7893] Re: linux'ta 2000 sorunu ??? - EK
From: Cenk Hasirlioglu (cenkh@cc.future.com.tr)
Date: Tue 27 Jul 1999 - 13:12:58 EET DST


> localtime fonksiyonu yil degerini 1900 den bu yana gecen yil sayisi olarak geri
> donduruyor. bunun icin $yil = "19$year" olarak degil de $yil = 1900 + $year
> olarak kullanman gerekiyor. zaten 2000 yilina geldiginde localtime in yili 00
> degil 100 verecektir.
>
> saygilar,
>
> Cenk Hasirlioglu ... 'dokumantasyon okumak faydalidir.'

biraz once eklemeyi unutmusum. liste sakinlerininin affina siginirim.

CH...

# perldoc -f localtime
=item localtime EXPR

Converts a time as returned by the time function to a 9-element array
with the time analyzed for the local time zone. Typically used as
follows:

    # 0 1 2 3 4 5 6 7 8
    ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
                                                localtime(time);

All array elements are numeric, and come straight out of a struct tm.
In particular this means that $mon has the range 0..11 and $wday has
the range 0..6 with sunday as day 0. Also, $year is the number of
years since 1900, that is, $year is 123 in year 2023.

If EXPR is omitted, uses the current time (C<localtime(time)>).

In a scalar context, returns the ctime(3) value:

    $now_string = localtime; # e.g., "Thu Oct 13 04:54:34 1994"

This scalar value is B<not> locale dependent, see L<perllocale>,
but instead a Perl builtin.
Also see the Time::Local module, and the strftime(3) and mktime(3)
function available via the POSIX module.
 
 Listeden cikmak icin:
          unsub linux
 mesajini listeci@bilkent.edu.tr'a gonderiniz.
   Lutfen Listeci icin MIME / HTML / Turkce Aksan kullanmayin.
  Liste arsivinin adresi: http://listweb.bilkent.edu.tr/


New Message Reply About this list Date view Thread view Subject view Author view

---------

Bu arsiv hypermail 2b25 tarafindan uretilmistir.