1N/ATime::localtime - by-name interface to Perl's built-in localtime() function 1N/A use Time::localtime; 1N/A printf "Year is %d\n", localtime->year() + 1900; 1N/A use Time::localtime; 1N/A $date_string = ctime(stat($file)->mtime); 1N/AThis module's default exports override the core localtime() function, 1N/Areplacing it with a version that returns "Time::tm" objects. 1N/AThis object has methods that return the similarly named structure field 1N/Aname from the C's tm structure from F<time.h>; namely sec, min, hour, 1N/Amday, mon, year, wday, yday, and isdst. 1N/AYou may also import all the structure fields directly into your namespace 1N/Aas regular variables using the :FIELDS import tag. (Note that this still 1N/Aoverrides your core functions.) Access these fields as 1N/Avariables named with a preceding C<tm_> in front their method names. 1N/AThus, C<$tm_obj-E<gt>mday()> corresponds to $tm_mday if you import 1N/AThe ctime() function provides a way of getting at the 1N/Ascalar sense of the original CORE::localtime() function. 1N/ATo access this functionality without the core overrides, 1N/Apass the C<use> an empty import list, and then access 1N/Afunction functions with their full qualified names. 1N/AOn the other hand, the built-ins are still available 1N/Avia the C<CORE::> pseudo-package. 1N/AWhile this class is currently implemented using the Class::Struct 1N/Amodule to build a struct-like class, you shouldn't rely upon this.