ProgClub Timestamp

Value Command UTC Shell
ISO format

Hi there! So this little utility generates source code comment labels and timestamps to Meet John's Standards. If you find it useful too, enjoy! Comments, bug reports, et cetera, to

Note that the source code comment label format is designed to be compatible with bugslist.php. Or maybe bugslist.php was designed to be compatible with the source code comment label format... let's not split hairs.

UTC is obviously Coordinated Universal Time, which you can enable if you wish. I used to be pedantic about using UTC everywhre, but after a fair bit of experience I decided that local time was generally better. Especially if you're using the date part without the time part, that gets a bit silly.

Shell commands are UNIX shell commands you can use to generate various output in your shell scripts. It's not likely to matter but there is potentially a small chance of error with the ISO/UTC timestamp shell script (the additional call to 'date' for the nanoseconds value causes a race condition).

ISO format relates to ISO 8601 which is a sensible and standardized date/time format. At the moment only UTC time is supported for use with the full ISO format above. If you have a burning need for something else let me know and I can look into implementing it for you!

This facility is a single file HTML, CSS, and Javascript program. If you want to know how it works or improve it you will find everything you need with good old view source! Or you can view with syntax-highlighting here.

A better way, on KDE

If you're running a sensible window manager (like KDE) on a sensible operating system (like Debian) you can bind keys to output the above content. In KDE Plasma: K -> Computer -> System Settings -> Shortcuts and Gestures -> Custom Shortcuts. I created a folder called "John's Stuff", then added these shortcuts:

Comment F1 xdotool type "$(date +%Y-%m-%d) $USER - "
Timestamp F4 xdotool type "$(date +%Y-%m-%d-%H%M%S)"

Note that you may need to: apt-get install xdotool