
Solid, safe website tools.
Whatever your need, Will Bontrager builds powerful software solutions.
|
(Get Attention Ticker for your web site)
Converting and Formatting System TimeBy Will Bontrager The system time is a number composed of 1 to 10 digits. The Perl script below converts system time numbers to a human readable date/time string. The system time number 1234567890 converts to Friday, February 13, 2009 at 04:31:30 PM, for example. The largest system time numbers current Unix/Linux operating systems can work with is 2147483646 (Monday, January 18, 2038 at 08:14:06 PM). That's when time stops :) Here is the script (about a hundred lines). Almost all of the above script is concerned with formatting. A default format is used because none is provided. Other formats can be specified. It's one of the code snippets I keep handy for pasting into projects. Probably I should make another post about formatting time and date strings. I'll do that sometime. December 3, 2005 Please note: Articles on this website are presented "as is". However - If you have a question about a CGI script, HTML, CSS, PHP, or JavaScript
Rate this blog post.
No page reload! |
|
|
© 1998-2001 William and Mari Bontrager |
|