Helping ordinary people create extraordinary websites!

Choosing The Right Server-Side Scripting Language

By Craig McElwee
2004-01-06

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.



Tutorial pages:

First published by IBM developerWorks


 1 Votes

You might also want to check these out:


Leave a Comment on "Choosing The Right Server-Side Scripting Language"
You must be logged in to post a comment.

Link to This Tutorial Page!


GET OUR NEWSLETTERS