Help for this page

Select Code to Download


  1. or download this
    sub timestamp {
      return localtime (time);
    }
    
    print '[' . timestamp() . ']: Normal Time Format'. "\n";
    
  2. or download this
    [Sat Jan  8 11:59:07 2011]: Normal Time Format
    
  3. or download this
    use Time::localtime;
    sub timestamp {
    ...
    }
    
    print '[' . timestamp() . ']: Custom Time Format'. "\n";
    
  4. or download this
    [2011-01-08_12:06:05]: Custom Time Format