#!/usr/bin/perl -w #=============================================================================== # # FILE: clock.pl # # USAGE: ./clock.pl # # DESCRIPTION: back end to the SVG dashboard clock demo # # OPTIONS: --- # REQUIREMENTS: --- # BUGS: --- # NOTES: --- # AUTHOR: Ronan Oger (ogerr), # COMPANY: RO IT Systems # VERSION: 1.0 # CREATED: 12/16/2005 12:49:33 AM UTC # REVISION: --- #=============================================================================== use strict; use Time::Piece; use JSON; my $j = new JSON; my $t = new Time::Piece; my $obj = { tzData => 'UTC', hourData => $t->hour(), minuteData => $t->min(), secondData => $t->sec(), ymdData=> $t->day()." ".$t->ymd(), }; my $js = $j->objToJson($obj); print "Content-type: text/plain\n\n$js";