cvs: presentations / time-phptek6.xml /slides/perf ezp.css /slides/time date-parse.xml sun-up-down.xml user-timezone.xml
| From: | Derick Rethans | Date: | Sun, 23 Apr 2006 15:08:00 +0000 |
| Subject: | cvs: presentations / time-phptek6.xml /slides/perf ezp.css /slides/time date-parse.xml sun-up-down.xml user-timezone.xml | ||
| Groups: | php.pres | ||
| Request: | Send a blank email to pres+get-1298@lists.php.net to get a copy of this message | ||
derick Sun Apr 23 15:08:00 2006 UTC
Added files:
/presentations time-phptek6.xml
/presentations/slides/time date-parse.xml user-timezone.xml
Modified files:
/presentations/slides/perf ezp.css
/presentations/slides/time sun-up-down.xml
Log:
- Some more date time slides
- Fixed problems with CSS and new background
http://cvs.php.net/viewcvs.cgi/presentations/slides/perf/ezp.css?r1=1.17&r2=1.18&diff_format=u
Index: presentations/slides/perf/ezp.css
diff -u presentations/slides/perf/ezp.css:1.17 presentations/slides/perf/ezp.css:1.18
--- presentations/slides/perf/ezp.css:1.17 Sat Apr 22 10:24:09 2006
+++ presentations/slides/perf/ezp.css Sun Apr 23 15:08:00 2006
@@ -6,6 +6,7 @@
margin-bottom:0em;
background-image: url(presentations/slides/perf/ezp.png);
background-attachment: fixed;
+ background-repeat: no-repeat;
overflow: -moz-scrollbars-none;
}
div.sticky {
http://cvs.php.net/viewcvs.cgi/presentations/slides/time/sun-up-down.xml?r1=1.1&r2=1.2&diff_format=u
Index: presentations/slides/time/sun-up-down.xml
diff -u presentations/slides/time/sun-up-down.xml:1.1 presentations/slides/time/sun-up-down.xml:1.2
--- presentations/slides/time/sun-up-down.xml:1.1 Sat Apr 22 10:24:54 2006
+++ presentations/slides/time/sun-up-down.xml Sun Apr 23 15:08:00 2006
@@ -2,17 +2,23 @@
<slide>
<title>Sunset/Sunrise</title>
- <example result="1"><![CDATA[<?php
-date_default_timezone_set('America/Montreal');
+ <example result="1"><![CDATA[<pre><font size="5"><?php
+date_default_timezone_set('Europe/Oslo');
if (isset($_POST['country'])) {
- $client = new SoapClient('http://geo.derickrethans.nl/geo.wsdl');
- $info = $client->Location($_POST['country'], $_POST['city']);
- $lat = $info['lat']; $lon = $info['lon'];
- $info = date_sun_info(time(), $lon, $lat);
- echo "Sunrise is at ", date(date::ATOM, $info['sunrise']),
"<br/>";
- echo "Sunset is at ", date(date::RSS, $info['sunset']),
"<br/><hr/>";
+ mysql_connect('localhost', 'root'); mysql_select_db('geolocation');
+ $re = mysql_query( "SELECT * FROM city where
country='{$_POST['country']}' AND
normalized_name='{$_POST['city']}'" );
+ $info = mysql_fetch_assoc( $re );
+ if ($info) {
+ $lat = $info['lat']; $lon = $info['lon'];
+
+ $info = date_sun_info(time(), $lon, $lat);
+ echo "Sunrise is at ", date(date::RSS, $info['sunrise']), "\n";
+ echo "Sunset is at ", date(date::RSS, $info['sunset']), "\n";
+ echo "Day length is ",
+ round(($info['sunset'] - $info['sunrise']) / 3600, 1), "hrs";
+ }
}
-?>
+?></font></pre>
<form method="post">
Country: <input name="country"/> City: <input
name="city"/><br/>
<input type="submit" value="Check"/>
http://cvs.php.net/viewcvs.cgi/presentations/time-phptek6.xml?view=markup&rev=1.1
Index: presentations/time-phptek6.xml
+++ presentations/time-phptek6.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<presentation
template="css"
navmode="html"
navbarbackground="#4373b4"
navbartopiclinks="0"
navColor="#f1fbff"
logo1=""
stylesheet="presentations/slides/perf/ezp.css"
backgroundfixed="1" >
<topic>Localization and Internationalization</topic>
<title>What Time is It?</title>
<event>php|tek</event>
<location>Orlando, Florida</location>
<date>April 25th, 2006</date>
<speaker>Derick Rethans</speaker>
<email>dr@ez.no</email>
<url>http://derickrethans.nl/talks.php</url>
<slide>slides/perf/title.xml</slide>
<!-- INTRODUCTION -->
<slide>slides/time/what-is-time.xml</slide>
<slide>slides/time/what-is-time2.xml</slide>
<slide>slides/time/problems-string-representation.xml</slide>
<slide>slides/time/problems-timezones.xml</slide>
<slide>slides/time/problems-timezone-abbr.xml</slide>
<slide>slides/time/problems-dst.xml</slide>
<slide>slides/time/problems-dst2.xml</slide>
<slide>slides/time/problems-dst3.xml</slide>
<!-- PHP - CURRENT -->
<slide>slides/time/current-functions.xml</slide>
<slide>slides/time/current-limitations.xml</slide>
<!-- PHP - IMPROVEMENTS -->
<slide>slides/time/improvements-overview.xml</slide>
<slide>slides/time/improvements-formats.xml</slide>
<slide>slides/time/improvements-timezones.xml</slide>
<!-- PHP - CODE EXAMPLES -->
<slide>slides/time/basic-parse-time.xml</slide>
<slide>slides/time/basic-parse-time-new.xml</slide>
<slide>slides/time/date-parse.xml</slide>
<!-- DATE EXAMPLES -->
<slide>slides/time/date-format.xml</slide>
<slide>slides/time/date-format-locale.xml</slide>
<slide>slides/time/date-modify.xml</slide>
<slide>slides/time/basic-using-zones.xml</slide>
<slide>slides/time/default-timezone.xml</slide>
<slide>slides/time/timezone-object-1.xml</slide>
<slide>slides/time/timezone-object-2.xml</slide>
<slide>slides/time/date-timezone.xml</slide> <!-- set/get -->
<slide>slides/time/timezone-utilities-1.xml</slide>
<slide>slides/time/timezone-utilities-2.xml</slide>
<slide>slides/time/timezone-database.xml</slide>
<!-- TIPS -->
<slide>slides/time/timezone-tips.xml</slide>
<slide>slides/time/sun-up-down.xml</slide>
<slide>slides/time/user-timezone.xml</slide>
<slide>slides/time/when.xml</slide>
<!-- EXIT -->
<slide>slides/time/resources.xml</slide> <!-- resources -->
</presentation>
http://cvs.php.net/viewcvs.cgi/presentations/slides/time/date-parse.xml?view=markup&rev=1.1
Index: presentations/slides/time/date-parse.xml
+++ presentations/slides/time/date-parse.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<slide>
<title>Parsing Dates</title>
<subtitle>With full control</subtitle>
<blurb>Parsing strings with the ~date_parse()~ function:</blurb>
<example result="1"><![CDATA[<pre><?php
$date = "22apr2006 8:36:14.43 #^ Europe/Oslo CEST";
$t = date_parse( $date );
echo $t['year'], '-', $t['month'], '-', $t['day'],
" ";
echo $t['hour'], ':', $t['minute'], ':',
$t['second'] + $t['fraction'], " ";
echo $t['tz_id'], "\n";
if ( $t['warning_count'] )
echo "Warnings:\n";
foreach( $t['warnings'] as $pos => $message )
echo "- $message @$pos\n";
if ( $t['error_count'] )
echo "Errors:\n";
foreach( $t['errors'] as $pos => $message )
echo "- $message @$pos\n";]]></example>
<break/>
</slide>
http://cvs.php.net/viewcvs.cgi/presentations/slides/time/user-timezone.xml?view=markup&rev=1.1
Index: presentations/slides/time/user-timezone.xml
+++ presentations/slides/time/user-timezone.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<slide>
<title>User's Timezone</title>
<subtitle>with a little javascript...</subtitle>
<example result="1"><![CDATA[<?php
if (!isset($_GET['tzinfo'])) {
?>
<html>
<script type="text/javascript">
var d = new Date()
var tza = d.toLocaleString().split(" ").slice(-1)
var tzo = d.getTimezoneOffset()
window.location = window.location + '?tzinfo=' + tza + '|' + tzo
</script>
</html>
<?php
} else {
list( $abbr, $offset ) = explode( '|', $_GET['tzinfo'] );
echo timezone_name_from_abbr( $abbr, $offset * -60 );
}
?>]]></example>
</slide>