Was 8 p.m. on 28th February in Los Angeles before or after 8 a.m. in Tokyo on 1st March? Perl has a very neat trick to handling dates and times, meaning that such questions can be easily resolved. We'll show you that trick, and we'll show you the various functions that you can use to handle dates and times in Perl.
This topic is presented on public courses
Perl Programming,
Perl bootcamp
Examples from our training material
| chivvy | Using %SIG to timeout keyboard entry |
| dt1 | file last modified (days ago) |
| dt2 | dt2 - file last modified (seconds from 1.1.1970) |
| dt3 | current date and time (system dependent!) |
| dt4 | use of time and localtime |
| dt5 | compare a stated date and time with now! |
| sigint | Use of Signals in Perl to trap ^C (Control C) |
| tim | Converting times between epoch seconds and regular time |
Opentalk forum discussions related to this topic
find modified file since a specific dateExtracting difference in hoursProblem with localtimeHow to create a file with specific date and timeQuestion about converting time
Pictures
Perl - a modern language for ancient languages
Background information
This module is available under an
Open Training Notes License for free download from
http://www.training-notes.co.uk.
Topics covered in this module
File status operators and stat.
System commands.
time, $^T, utime and other sources of time data.
Conversion to epoch seconds.
Conversion from epoch seconds.
Time calculations and elapsed time.
Year 2000 and year 2038 compliance.
Sleep and the alarm signal.
Complete learning
If you are looking for a complete course and not just a information on a single subject, visit our
Listing and schedule page.
Well House Consultants specialise in training courses in
Python,
Perl,
PHP, and
MySQL. We run
Private Courses throughout the UK (and beyond for longer courses), and
Public Courses at our training centre in Melksham, Wiltshire, England.
It's surprisingly cost effective to come on our public courses -
even if
you live in a different
country or continent to us.
We have a technical library of over 600 books on the subjects on which we teach.
These books are available for reference at our training centre. Also
available is the Opentalk
Forum for discussion of technical questions.