#!/bin/ksh # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# # runy2ktests.ksh # Set system clock to Y2K dates of interest and run the Y2K tests. # Needs root/administrator privilege # # WARNING: Because this script needs to be run with root/administrator # privilege, thorough understanding of the script and extreme # caution are urged. #
# # SECTION I # Define variables #
SYSTEM_INFO=`uname -a`
OS_ARCH=`uname -s` if [ $OS_ARCH = "Windows_NT" ] || [ $OS_ARCH = "Windows_95" ] then
NULL_DEVICE=nul else
NULL_DEVICE=/dev/null fi
# # Test dates for NSPR Y2K tests #
Y2KDATES=" 123123591998.55
090923591999.55
123123591999.55
022823592000.55
022923592000.55
123123592000.55"
set_date()
{
case $OS_ARCH in
Windows_NT) # # The date command in MKS Toolkit releases 5.1 and 5.2 # uses the current DST status for the date we want to # set the system clock to. However, the DST status for # that date may be different from the current DST status. # We can work around this problem by invoking the date # command with the same date twice. #
date "$1" > $NULL_DEVICE
date "$1" > $NULL_DEVICE
;;
*)
date "$1" > $NULL_DEVICE
;;
esac
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.