date.pl
Upload User: caisangzi8
Upload Date: 2013-10-25
Package Size: 15756k
Code Size: 1k
Category:

DVD

Development Platform:

C/C++

  1. #  0    1    2     3     4    5     6     7     8
  2. ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
  3. # int  tm_sec; /* seconds after the minute - [0, 61] */
  4. # /* for leap seconds */
  5. # int  tm_min; /* minutes after the hour - [0, 59] */
  6. # int  tm_hour; /* hour since midnight - [0, 23] */
  7. # int  tm_mday; /* day of the month - [1, 31] */
  8. # int  tm_mon; /* months since January - [0, 11] */
  9. # int  tm_year; /* years since 1900 */
  10. # int  tm_wday; /* days since Sunday - [0, 6] */
  11. # int  tm_yday; /* days since January 1 - [0, 365] */
  12. # int  tm_isdst; /* flag for alternate daylight savings time */
  13. $now_year = $year+1900;
  14. $now_month = $mon+1;
  15. $now_day = $mday;
  16. $oline = sprintf "%04d%02d%02d", $now_year, $now_month, $now_day;
  17. print $oline;