Home Accessibility Courses Twitter The Mouth Facebook Resources Site Map About Us Contact
 
20.9.2014 - We have just updated our course layouts and descriptions and added our 2015 schedule.

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

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

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

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


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
4292 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 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., 2014: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 899360 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho

PAGE: http://www.wellho.net/mouth/239_What ... epoch.html • PAGE BUILT: Thu Sep 18 15:30:25 2014 • BUILD SYSTEM: WomanWithCat