// display current time at author location
// =======================================
// copyright Stephen Chapman, Felgall Pty Ltd, 11 July 2001
// http://www.felgall.com/
// permission is given to use this script for non commercial purposes
// provided that all comment lines in the script are retained

function myTime() {
var dst = 0;           // set to 1 for daylight savings time
                       // this field needs to be updated as you go on and off daylight saving time

var loc = 'Sydney, Australia'; // set to your location
var mtz = -4;          // set to your local timezone (hours ahead of UTC, negative if behind)
var stdz = '';     // standard time indicator
var dayz = '';     // daylight saving time indicator

// do not alter anything below this line
var dayname = new Array ('Samstag','Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag','Sonntag');
var now = new Date; var dayofweek = now.getUTCDay() + 1; var minute = (now.getUTCHours() * 60) + now.getUTCMinutes() + (mtz * 60);
if (dst) {minute += 60;} if (minute > 1440) {minute -= 1440; dayofweek++;} if (minute < 0) {minute += 1440; dayofweek--;}
var hour = Math.floor(minute / 60); minute = minute - (hour * 60); if (hour > 11) {ampm = 'PM'; hour -= 12;} else {ampm = 'AM'}
if (hour == 0) {hour = 12;} if (minute < 10) {pad = ':0';} else {pad = ':';};
document.writeln(dayname[dayofweek] + ',');
document.write(hour + pad + minute + ' ' + ampm); if (dst) {document.writeln(dayz);} else {document.writeln(stdz);}
}
