This is for Linux users, but there are ways to implement it on Windows and Mac boxes (but you are on your own.)
If you use the movable type interface, you will know that when you generate a “Create New Entry” page, the current date is placed in the “Entry Date” filed. But, as time passes, that date does not change. So, if you work on this post for an hour, the date of your post is now an hour stale. You get the point.
To fix this, you need to adjust the date before you “Publish” the post. But the date has to be in exactly the same format. And the time zone you are publishing on may not be the time zone you live in. And so on.
I have a solution.
I have a little script that you can have. I have a terminal window open, and when I type in “now” (the name of the executable script), I get a string of numbers that is the exact format Movable type requires, in EST (I live in CST). I can copy and paste this into the Entry Date field.
You may need to adjust the script to have your own time zone adjustment (or no adjustment at all). It should be obvious how to do this.
Put the script in a text file in your “bin” directory (which in turn should be on your PATH) and chmod it to make it executable.
Here is the script:
# outputs a date in MT format one hour from now (thus EST)
# REVISE LATER: Zap this output into the clipboard
date -d '+1 hour' '+%Y-%m-%d %H:%M:%S'
And here is what it looks like when it runs:
In the near future, I’ll revise this to make it more useful, but let me tell you what that will involve in case you want to start working on this now. I’ll pipe the output of this script to a python or perl app that will insert it onto the clipboard. Then, I’ll make a button on my Gnome task bar that runs the script. So, all I’ll need to get the current date is to hit the button and the date in on the clipboard ready to be pasted.
The next step after that, of course, is to have a bit of perl code that finds the web page and sticks the data into the appropriate field. I have no idea how to do this, but how hard can it be?
Then, the next obvious step is to run this script with the use of my new Mind Control Helmet.…