GC> #date imi spune ca sunt in NOV
GC> dar un script in perl ce foloseste localtime imi ca sunt in luna 10 ceva
GC> de genul
GC> ($Second, $Minute, $Hour, $Day, $Month, $Year) = localtime;
GC> Scriptul functiona dar nu l-am mai folosit de mult
GC> De unde apare neconcordanta?

localtime iti returneaza luna numerotand de la 0. In felul asta, Ianuarie =
0 si Decembrie = 11.

=== cut here ===
localtime EXPR
         Converts a time as returned by the time function to a 9-element
         list 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 list elements are numeric, and come straight out of the C
         `struct tm'.  $sec, $min, and $hour are the seconds, minutes,
         and hours of the specified time.  $mday is the day of the
         month, and $mon is the month itself, in the range 0..11 with 0
         indicating January and 11 indicating December.  $year is the
         number of years since 1900.  That is, $year is 123 in year
         2023.  $wday is the day of the week, with 0 indicating Sunday
         and 3 indicating Wednesday.  $yday is the day of the year, in
         the range 0..364 (or 0..365 in leap years.)  $isdst is true if
         the specified time occurs during daylight savings time, false
         otherwise.
=== and here ===

-- 
GRN

Temet Nosce


--- 
Detalii despre listele noastre de mail: http://www.lug.ro/


Raspunde prin e-mail lui