Plan 9 from Bell Labs’s /usr/web/sources/contrib/quanstro/timezone/tzdump

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#!/bin/rc
# print a plan9 timezone file in human readable form

if (~ $#* 0){
	echo 'usage: tzdump <timezone file>...'
	exit 'usage'
}

awk '
	NR == 1 { 
		printf("STD: %s = UTC%+d\n", $1, $2);
		printf("DST: %s = UTC%+d\n", $3, $4);
	}
	NR != 1 {
		for (i = 1; i <= NF; i++){
			printf("%-8lu ", $i);
			system(sprintf("date %d", $i));
		}
	}
' $*

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].