Home Accessibility Courses Twitter The Mouth Facebook Resources Site Map About Us Contact
 
For 2023 (and 2024 ...) - we are now fully retired from IT training.
We have made many, many friends over 25 years of teaching about Python, Tcl, Perl, PHP, Lua, Java, C and C++ - and MySQL, Linux and Solaris/SunOS too. Our training notes are now very much out of date, but due to upward compatability most of our examples remain operational and even relevant ad you are welcome to make us if them "as seen" and at your own risk.

Lisa and I (Graham) now live in what was our training centre in Melksham - happy to meet with former delegates here - but do check ahead before coming round. We are far from inactive - rather, enjoying the times that we are retired but still healthy enough in mind and body to be active!

I am also active in many other area and still look after a lot of web sites - you can find an index ((here))
What and why for the epoch

The Epoch occurred on 1st January 1970 ... at midnight, at the start of the day, GMT. It's an important concept in many programming languages, which work with times and dates before and after the epoch - it means that you can compare dates and times easily, even where month ends and different timezones are involved. It's a pity that "now" in epoch seconds is displayed as a somewhat meaningless 1110304887 whereas you might prefer it to be displayed in a format such as Tue, 8 Mar 2005 10:01:27 -0800. The Perl language includes converters to translate between Epoch seconds and "human" time, as do PHP, Python, and Tcl/Tk - and they provide a powerful mechanism to calculate with times which otherwise would be an awkward mixture of modulo 7, 24, 52, 60 and 365 arithmetic.

Computer systems that run with 32 bit addressing (with one bit reserved for a sign) will "run out" of epoch seconds in the year 2038; perhaps that will be our next big "year 2K" issue. More likely, 64 bit systems will be in use throughout by then and the issue won't be an issue.

As a footnote, not all software uses epoch seconds. The software that we use for our internal diary system (not something we wrote ourselves) uses days from 1st January 0 - the year zero.
(written 2005-03-08, updated 2008-05-16)

 
Associated topics are indexed as below, or enter http://melksh.am/nnnn for individual articles
Y115 - Additional Python Facilities
  [183] The elegance of Python - (2005-01-19)
  [208] Examples - Gadfly, NI Number, and Tcl to C interface - (2005-02-10)
  [463] Splitting the difference - (2005-10-13)
  [663] Python to MySQL - (2006-03-31)
  [672] Keeping your regular expressions simple - (2006-04-05)
  [753] Python 3000 - the next generation - (2006-06-09)
  [901] Python - listing out the contents of all variables - (2006-10-21)
  [1043] Sending an email from Python - (2007-01-18)
  [1136] Buffering output - why it is done and issues raised in Tcl, Perl, Python and PHP - (2007-04-06)
  [1149] Turning objects into something you can store - Pickling (Python) - (2007-04-15)
  [1305] Regular expressions made easy - building from components - (2007-08-16)
  [1336] Ignore case in Regular Expression - (2007-09-08)
  [1337] A series of tyre damages - (2007-09-08)
  [1876] Python Regular Expressions - (2008-11-08)
  [2407] Testing code in Python - doctest, unittest and others - (2009-09-16)
  [2435] Serialization - storing and reloading objects - (2009-10-04)
  [2462] Python - how it saves on compile time - (2009-10-20)
  [2655] Python - what is going on around me? - (2010-02-28)
  [2721] Regular Expressions in Python - (2010-04-14)
  [2745] Connecting Python to sqlite and MySQL databases - (2010-04-28)
  [2746] Model - View - Controller demo, Sqlite - Python 3 - Qt4 - (2010-04-29)
  [2764] Python decorators - your own, staticmethod and classmethod - (2010-05-14)
  [2765] Running operating system commands from your Python program - (2010-05-14)
  [2786] Factory methods and SqLite in use in a Python teaching example - (2010-05-29)
  [2790] Joining a MySQL table from within a Python program - (2010-06-02)
  [3089] Python regular expressions - repeating, splitting, lookahead and lookbehind - (2010-12-17)
  [3442] A demonstration of how many Python facilities work together - (2011-09-16)
  [3469] Teaching dilemma - old tricks and techniques, or recent enhancements? - (2011-10-08)
  [4085] JSON from Python - first principles, easy example - (2013-05-13)
  [4211] Handling JSON in Python (and a csv, marshall and pickle comparison) - (2013-11-16)
  [4298] Python - an interesting application - (2014-09-18)
  [4439] Json is the new marshall, pickle and cPickle / Python - (2015-02-22)
  [4451] Running an operating system command from your Python program - the new way with the subprocess module - (2015-03-06)
  [4536] Json load from URL, recursive display, Python 3.4 - (2015-10-14)
  [4593] Command line parameter handling in Python via the argparse module - (2015-12-08)
  [4709] Some gems from Intermediate Python - (2016-10-30)

T214 - Tcl/Tk - Other Facilities in Tcl
  [364] pu daily and p hourly - (2005-06-30)
  [366] Error handling in Tcl through catch - (2005-07-02)
  [461] Shortened interactive commands - (2005-10-11)
  [748] Getting rid of variables after you have finished with them - (2006-06-06)
  [782] Converting between Hex and Decimal in Tcl - (2006-06-28)
  [1277] AgtInvoke - a command to drive Agilent Tcl software extensions - (2007-07-26)
  [1334] Stable sorting - Tcl, Perl and others - (2007-09-06)
  [1338] Handling Binary data in Tcl (with a note on C) - (2007-09-09)
  [2467] Tcl - catching an error before your program crashes - (2009-10-22)
  [3287] Exceptions - Tcl style - (2011-05-12)
  [3570] Trapping errors in Tcl - the safety net that catch provides - (2012-01-06)
  [3583] Expanding a list of parameters in Tcl - {*} and eval - (2012-01-17)
  [4207] Exception handling in Tcl - (2013-11-14)
  [4523] Catching failed commands and not crashing the program in Tcl - (2015-10-10)
  [4525] What does Tcl do if you try to run a command that is not defined? - (2015-10-10)
  [4762] Coverage map in Tcl - how many times has each proc been called? - (2017-09-28)

P216 - Perl - Handling Dates and Time
  [454] Time conversions in Perl - (2005-10-02)
  [765] Perl - turning seconds into days, hours, minutes and seconds - (2006-06-17)

H999 - Additional PHP Material
  [54] PHP and natural sorting - (2004-09-19)
  [320] Ordnance Survey - using a 'Get a map' - (2005-05-22)
  [322] More maps - (2005-05-23)
  [337] the array returned by preg_match_all - (2005-06-06)
  [372] Time calculation in PHP - (2005-07-08)
  [468] Stand alone PHP programs - (2005-10-18)
  [483] Double Dollars in PHP - (2005-11-02)
  [493] Running a Perl script within a PHP page - (2005-11-12)
  [563] Merging pictures using PHP and GD - (2006-01-13)
  [603] PHP - setting sort order with an associative array - (2006-02-13)
  [665] PHP Image viewing application - (2006-04-01)
  [687] Presentation, Business and Persistence layers in Perl and PHP - (2006-04-17)
  [789] Hot answers in PHP - (2006-07-02)
  [806] Check your user is human. Have him retype a word in a graphic - (2006-07-17)
  [822] PHP - a team member leaves - (2006-08-04)
  [839] Reporting on the 10 largest files or 10 top scores - (2006-08-20)
  [917] Syntax checking in PHP - (2006-11-07)
  [937] Display an image from a MySQL database in a web page via PHP - (2006-11-22)
  [1010] Dates, times, clickable diarys in PHP - (2006-12-28)
  [1020] Parallel processing in PHP - (2007-01-03)
  [1053] Sorting people by name in PHP - (2007-01-26)
  [1104] Drawing dynamic graphs in PHP - (2007-03-09)
  [1194] Drawing hands on a clock face - PHP - (2007-05-19)
  [1270] PHP Standalone - keyboard to screen - (2007-07-18)
  [1389] Controlling and labelling Google maps via PHP - (2007-10-13)
  [1390] Converting from postal address to latitude / longitude - (2007-10-13)
  [1391] Ordnance Survey Grid Reference to Latitude / Longitude - (2007-10-14)
  [1451] More PHP sample and demonstration programs - (2007-12-01)
  [1485] Copyright and theft of images, bandwidth and members. - (2007-12-26)
  [1505] Script to present commonly used images - PHP - (2008-01-13)
  [1519] Flipping images on your web page - (2008-01-26)
  [1623] PHP Techniques - a workshop - (2008-04-26)
  [2073] Extra PHP Examples - (2009-03-09)
  [2215] If nothing, make it nothing. - (2009-06-02)
  [2684] Exception handling in PHP - (2010-03-18)
  [3118] Arrays of arrays - or 2D arrays. How to program tables. - (2011-01-02)
  [3210] Catchable fatal error in PHP ... How to catch, and alternative solutions such as JSON - (2011-03-22)
  [4655] Image indexer / thumbnail display scripts in PHP - (2016-02-25)


Back to
Difficulties with a trolley
Previous and next
or
Horse's mouth home
Forward to
Conventional restraints removed
Some other Articles
new 'Perl on the Web' example
Satisfaction of training
Dress for training
Conventional restraints removed
What and why for the epoch
Difficulties with a trolley
Crossfertilisation, PHP to Python
Tapping in on resources
Preparation for a day's work
How to get the best from your supplier
4759 posts, page by page
Link to page ... 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96 at 50 posts per page


This is a page archived from The Horse's Mouth at http://www.wellho.net/horse/ - the diary and writings of Graham Ellis. Every attempt was made to provide current information at the time the page was written, but things do move forward in our business - new software releases, price changes, new techniques. Please check back via our main site for current courses, prices, versions, etc - any mention of a price in "The Horse's Mouth" cannot be taken as an offer to supply at that price.

Link to Ezine home page (for reading).
Link to Blogging home page (to add comments).

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2024: 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho

PAGE: http://www.wellho.net/mouth/239_What ... epoch.html • PAGE BUILT: Sun Oct 11 16:07:41 2020 • BUILD SYSTEM: JelliaJamb