Comments on: DST Readines Test for MySQL and PHP http://www.terminally-incoherent.com/blog/2007/03/09/dst-readines-test-for-mysql-and-php/ I will not fix your computer. Tue, 04 Aug 2020 22:34:33 +0000 hourly 1 https://wordpress.org/?v=4.7.26 By: Luke http://www.terminally-incoherent.com/blog/2007/03/09/dst-readines-test-for-mysql-and-php/#comment-3300 Fri, 09 Mar 2007 20:52:09 +0000 http://www.terminally-incoherent.com/blog/2007/03/09/dst-readines-test-for-mysql-and-php/#comment-3300

Oh man… It went into moderation queue and then WordPress totally barfed when I approved it. But it seems that it did go through.

Reply  |  Quote
]]>
By: Craig Betts http://www.terminally-incoherent.com/blog/2007/03/09/dst-readines-test-for-mysql-and-php/#comment-3299 Fri, 09 Mar 2007 20:45:22 +0000 http://www.terminally-incoherent.com/blog/2007/03/09/dst-readines-test-for-mysql-and-php/#comment-3299

Luke- got a way to fix that error in my typing on that script?

Reply  |  Quote
]]>
By: Craig Betts http://www.terminally-incoherent.com/blog/2007/03/09/dst-readines-test-for-mysql-and-php/#comment-3298 Fri, 09 Mar 2007 20:42:12 +0000 http://www.terminally-incoherent.com/blog/2007/03/09/dst-readines-test-for-mysql-and-php/#comment-3298

For those interested, I wrote a script to update the zoneinfo files on Solaris and Linux:
#!/bin/sh

####################################
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/#
#_/ _/#
#_/ Zoneinfo Update Script _/#
#_/ Written by Craig A. Betts _/#
#_/ January 31, 2007 _/#
#_/ _/#
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/#
####################################

###########
# ABOUT #
###########
# This script will partially automate the process
# of rebuilding the timezone files for UNIX.

#############
# CHANGES #
#############

##############
# SETTINGS #
##############
# Get Host Type
hosttype=`uname -s`

# Location of the untarred tzdata file from ftp://elsie.nci.nih.gov/pub
tzsource=/tmp/junk

# Timestamp for backups
timestamp=`date '+%Y%m%d%H%M%S'`

# Some commands are in different places on different OSes.
# We will set the default here for now.
zic=/usr/sbin/zic

##########
# MAIN #
##########
case $hosttype in

SunOS)
ziloc=/usr/share/lib/zoneinfo
;;

Linux)
ziloc=/usr/share/zoneinfo
;;

*)
echo "I do not know how to update systems of type $hosttype"
exit 1
;;

esac

# Make a backup!
cp -R $ziloc $ziloc.bak-$timestamp

# Rebuild the database!
for zone in africa antarctica asia australasia etcetera \
europe factory northamerica solar87 solar88 solar89 \
southamerica systemv backward
do
echo "$zic -v $tzsource/$zone"
$zic -v $tzsource/$zone
done

grab the latest definition from ftp://elsie.nci.nih.gov/pub and place it in /tmp/junk. The script will do the rest.

Reply  |  Quote
]]>