Wandering, how to find the list of timezones currently supported by PHP ?
A quick solution. I needed it somewhere, so I wrote some lines. Rough code, but you better check the output :)
Reference : http://www.php.net/manual/en/timezones.php
sed "s/href=\"/\n/g" | \
grep -i "^timezones" | \
awk -F "." '{print "http://php.net/manual/en/timezones."$2".php"}'`
for a in $listoftimezones
do
curl -s "$a" | \
grep "td align=\"left\"" | \
html2text
echo ""
done;
A quick solution. I needed it somewhere, so I wrote some lines. Rough code, but you better check the output :)
Reference : http://www.php.net/manual/en/timezones.php
#!/bin/bash listoftimezones=`curl -s "php.net/manual/en/timezones.php" | \ grep -i "href=\"timezones\..*\.php\">" | \sed "s/href=\"/\n/g" | \
grep -i "^timezones" | \
awk -F "." '{print "http://php.net/manual/en/timezones."$2".php"}'`
for a in $listoftimezones
do
curl -s "$a" | \
grep "td align=\"left\"" | \
html2text
echo ""
done;
And here's the output