home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / perl / 7919 < prev    next >
Encoding:
Text File  |  1993-01-21  |  1.2 KB  |  41 lines

  1. Newsgroups: comp.lang.perl
  2. Path: sparky!uunet!psinntp!juliet!news
  3. From: jja@fnbc.com (Joseph Alotta)
  4. Subject: month in localtime?
  5. Message-ID: <1993Jan20.205428.19963@fnbc.com>
  6. Keywords: time,month
  7. Sender: news@fnbc.com
  8. Organization: First National Bank Of Chicago, Chicago IL, USA
  9. Date: Wed, 20 Jan 93 20:54:28 GMT
  10. Lines: 29
  11.  
  12. greetings,
  13.  
  14. how does one get the month out in localtime?
  15. this one's right out of the book:
  16.  
  17. #!/usr/local/bin/perl  
  18. ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
  19. print "$sec,$min,$hour,$mday,mon=$mon,$year,$wday,$yday,$isdst\n";
  20. exit;
  21.  
  22. amy{jja}44: headline.prl
  23. 19,52,14,20,mon=0,93,3,19,0
  24. amy{jja}45: date
  25. Wed Jan 20 14:52:21 CST 1993
  26.  
  27.  
  28. thanks,
  29.  
  30. joe.
  31.  
  32.  
  33. --
  34. ==============================================================
  35. ! joe alotta                                    jja@fnbc.com !                                               
  36. !                                             (312) 732-3439 !
  37. !                                                            !
  38. ! "The main thing is to keep the main thing the main thing." !
  39. ! Dr. George Sweeney                                         !
  40. ==============================================================
  41.