time-to-time

Registered by subliminalfix

# clock.cgi

#!/usr/bin/perl

use lib '/path/to/library';

use GD;

use POSIX; # For the date pretty-printing

$img = new GD::Image(71,16);

$black = $img->colorAllocate(0,0,0);

$green = $img->colorAllocate(0,200,10);

$img->fill(0,0,$black);

$readout=POSIX::strftime("%I:%M %P", localtime time);

$img->string(gdSmallFont,3,1,$readout,$green);

# send the image to the browser

# the Expires: header will keep browser's from caching it,

# ensuring that users always see an accurate clock (or at least

# a recently updated one)

binmode STDOUT;

print "Expires: now\n","Content-type: image/jpeg\n\n",$img->jpeg;

Blueprint information

Status:
Not started
Approver:
None
Priority:
Undefined
Drafter:
None
Direction:
Needs approval
Assignee:
None
Definition:
New
Series goal:
None
Implementation:
Informational Informational
Milestone target:
None

Sprints

Whiteboard

rainy rain

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.