Choosing The Right Server-Side Scripting Language
By Craig McElwee
2004-01-06
Reader Rating:

Task 1: Get and Format The Time/Date
This is more of a convenience than anything else. If your script writes to a log, you'll probably want a human-readable date/time. Interestingly, there seem to be two methodological camps on this basic function, in particular the Raw Date vs. the Formatted Date.
The Raw Date camp, which includes Perl, Python, and Tcl, returns the number of seconds from a set point in time, which can then be fed into time and date formatting functions. If you are going to be doing extensive date manipulation, this may be preferable to getting fully formatted dates as strings, as in Java servlets and PHP. Indeed, there is an exception to every rule, and we won't cover all the bases here.
First published by IBM developerWorks
If you found this article interesting, you may want to read these as well:
» Protecting your PHP and HTML Source Code
» Publishing Newsletters Using PHP & MySQL - 4
» Publishing Newsletters Using PHP & MySQL - 3
» Publishing Newsletter Using PHP & MySQL - 2
» Publishing Newsletters Using PHP & MySQL
» Unix Webserver Crontab Basics
|