Just a quick post but it is one that I had to use recently so thought I would quickly make a note of it so that it helps others out.
With the new year coming I had to update a sites copyright year which was displayed in the footer. It was a simple enough thing to do but I feared that I would need to be doing it again this time next year.
The solution was to use PHP to output the current year.
echo date("Y");
If your server doesn’t support PHP check see if there are any other server side scripting languages such as ASP, Perl, Python or Ruby etc They all have similar functions for returning the current year.
One comment
…………………………………Posted ..As its something of a problem I think reporting it as a bug is appropriate…More detail is there but to sum it up on servers that dont provide a year in the raw listing SmartFTP apparently guesses based on the time relative to the current time…To quote Mat from that thread .. For dates without a year in the listing the following rule applies . . If date in listing is in the future Year Current Year – 1. Theres some – here about 6 hours because the FTP server may be in a different time zone.. . If date is in the past Year Current Year. . Thats the reason the year is not always correct. If you have a better idea how to solve this missing year in date problem pelase let me know…My servers timezone is GMT.
Our apologies, you must be logged in to post a comment.