com presentations: Tweaks for Lonestar talks.: profiling-lonestar13.xml slides/profiling/find-out-if-it-is-slow.xml
slides/time/basic-parse-time-new.xml slides/time/date-modify.xml slides/time/date-parse-from-format2.xml slides/time/date-parse-from-format3.xml
slides/time/date-parse2.xml slides/time/date-timezone.xml slides/time/improvements-timezones.xml slides/time/intervals-2.xml slides/time/intervals.xml
slides/time/problems-condensed.xml sli

From: Date: Wed, 26 Jun 2013 13:24:22 +0000
Subject: com presentations: Tweaks for Lonestar talks.: profiling-lonestar13.xml slides/profiling/find-out-if-it-is-slow.xml
slides/time/basic-parse-time-new.xml slides/time/date-modify.xml slides/time/date-parse-from-format2.xml slides/time/date-parse-from-format3.xml
slides/time/date-parse2.xml slides/time/date-timezone.xml slides/time/improvements-timezones.xml slides/time/intervals-2.xml slides/time/intervals.xml
slides/time/problems-condensed.xml sli
Groups: php.pres 
Request: Send a blank email to pres+get-1899@lists.php.net to get a copy of this message
Commit: 1583ce1f83baad08f260dcbfe9dd41e07467f51f Author: Derick Rethans <github@derickrethans.nl> Wed, 26 Jun 2013 09:24:22 -0400 Parents: d882220e8bd9b18baec0d8146e0dccda56b40dcd Branches: master Link: http://git.php.net/?p=presentations.git;a=commitdiff;h=1583ce1f83baad08f260dcbfe9dd41e07467f51f Log: Tweaks for Lonestar talks. Changed paths: M profiling-lonestar13.xml M slides/profiling/find-out-if-it-is-slow.xml M slides/time/basic-parse-time-new.xml M slides/time/date-modify.xml M slides/time/date-parse-from-format2.xml M slides/time/date-parse-from-format3.xml M slides/time/date-parse2.xml M slides/time/date-timezone.xml M slides/time/improvements-timezones.xml M slides/time/intervals-2.xml M slides/time/intervals.xml M slides/time/problems-condensed.xml M slides/time/relative-month.xml M slides/time/relative-month3.xml M slides/time/timestamps-suck.xml M slides/time/timezone-object-1.xml M slides/time/timezone-utilities-3.xml M slides/xdebug/why-debugger3.xml M time-lonestar13.xml

diff --git a/profiling-lonestar13.xml b/profiling-lonestar13.xml index e742f15..92c387e 100644 --- a/profiling-lonestar13.xml +++ b/profiling-lonestar13.xml @@ -1,16 +1,16 @@ <?xml version="1.0" encoding="utf-8"?> -<presentation css="10gen.css"> +<presentation css="10gen-strict.css"> <topic>Debugging</topic> -<title>Profiling PHP Applications</title> +<title>Profiling</title> <event>Lonestar PHP</event> <location>Addison, TX, USA</location> <date>June 28th, 2013</date> <speaker>Derick Rethans</speaker> -<email>derick@derickrethans.nl</email> +<email>derick@php.net</email> <twitter>derickr</twitter> <url>http://derickrethans.nl/talks.html</url> <joindin>http://joind.in/8701</joindin> -<slide>slides/dbus/title.xml</slide> +<slide>slides/mongodb/title.xml</slide> <slide>slides/mongodb/me.xml</slide> <!-- not everything you read on the internet *matters* --> diff --git a/slides/profiling/find-out-if-it-is-slow.xml b/slides/profiling/find-out-if-it-is-slow.xml index d6aa173..83009ad 100644 --- a/slides/profiling/find-out-if-it-is-slow.xml +++ b/slides/profiling/find-out-if-it-is-slow.xml @@ -3,12 +3,11 @@ <blurb>Benchmark the application: siege (httperf, jmeter-http)</blurb> <list> - <bullet>check ~/.siegerc and set the %logfile% setting</bullet> <bullet>Create a file with urls:<example><![CDATA[http://derickrethans.nl/ http://derickrethans.nl/spatial-indexes-data-sqlite.html http://derickrethans.nl/talks.html http://derickrethans.nl/who.html]]></example></bullet> - <bullet>run against your code: %siege -c 40 -r 10 -f /tmp/urls.txt%</bullet> + <bullet>%siege -c 40 -r 10 -f /tmp/urls.txt%</bullet> </list> <example><![CDATA[Transactions: 400 hits Availability: 100.00 % diff --git a/slides/time/basic-parse-time-new.xml b/slides/time/basic-parse-time-new.xml index d80397a..bffa53e 100644 --- a/slides/time/basic-parse-time-new.xml +++ b/slides/time/basic-parse-time-new.xml @@ -2,21 +2,20 @@ <slide> <title>Parsing Dates</title> - <blurb>Parsing strings for date time information by instantiating a - DateTime object:</blurb> + <blurb>Parsing strings for date time information:</blurb> <example><![CDATA[<?php - $dt = new DateTime("2010-03-08 08:43:57"); + $dt = new DateTime("2010-03-08 08:43:57"); ?>]]></example> <break/> - <blurb>This function will not return the timestamp as an integer, but - instead returns a DateTime object which is a wrapper around a 64 bit - integer, which you can access (as string) through:</blurb> + <blurb>This function will *not* return the timestamp as an integer, but + instead returns a DateTime object, which you can access (as string) + through:</blurb> <break/> <example result="1"><![CDATA[<?php - $dt = new DateTime("2010-03-08 08:44:12"); - echo $dt->format( 'U' ), "\n"; + $dt = new DateTime("2010-03-08 08:44:12"); + echo $dt->format( 'U' ), "\n"; ?>]]></example> <break/> diff --git a/slides/time/date-modify.xml b/slides/time/date-modify.xml index 81a235e..6cfd505 100644 --- a/slides/time/date-modify.xml +++ b/slides/time/date-modify.xml @@ -1,25 +1,23 @@ <?xml version="1.0" encoding="ISO-8859-1"?> <slide> - <title>Modifying Dates</title> + <title>Modifying Dates</title> - <blurb>Modifying dates and times:</blurb> - <example result="0"><![CDATA[<?php - date_default_timezone_set("Europe/London"); - $ts = new DateTime("2010-03-08 15:53:55"); + <example result="0"><![CDATA[<?php + date_default_timezone_set("Europe/London"); + $ts = new DateTime("2010-03-08 15:53:55"); - $ts->modify("+2 days"); + $ts->modify("+2 days"); - $ts->modify("Friday +3 weeks"); + $ts->modify("Friday +3 weeks"); - $ts->modify("next friday"); + $ts->modify("next friday"); ?>]]></example> -<break/> <blurb>Result:</blurb> - <blurb class='pre'> Mon, 08 Mar 2010 15:53:55 +0000</blurb> + <blurb class='pre'> Mon, 08 Mar 2010 15:53:55 +0000</blurb> - <blurb effect="fade-in" class='pre'> |ef2929|Wed, 10 Mar| 2010 15:53:55 +0000</blurb> - <blurb effect="fade-in" class='pre'> |ef2929|Fri, 02 Apr| 2010 15:53:55 |ef2929|+0100|</blurb> - <blurb effect="fade-in" class='pre'> Fri, |ef2929|09 Apr| 2010 15:53:55 +0100</blurb> + <blurb effect="fade-in" class='pre'> |ef2929|Wed, 10 Mar| 2010 15:53:55 +0000</blurb> + <blurb effect="fade-in" class='pre'> |ef2929|Fri, 02 Apr| 2010 15:53:55 |ef2929|+0100|</blurb> + <blurb effect="fade-in" class='pre'> Fri, |ef2929|09 Apr| 2010 15:53:55 +0100</blurb> </slide> diff --git a/slides/time/date-parse-from-format2.xml b/slides/time/date-parse-from-format2.xml index 46b79b9..33654fe 100644 --- a/slides/time/date-parse-from-format2.xml +++ b/slides/time/date-parse-from-format2.xml @@ -1,21 +1,18 @@ <?xml version="1.0" encoding="ISO-8859-1"?> <slide> <title>Parsing Dates</title> - <subtitle>With user-defined format</subtitle> - <blurb>Creating strings with the ~date_create_from_format()~ function:</blurb> + <blurb>Creation with the ~date_create_from_format()~ function:</blurb> <example result="0"><![CDATA[<?php $date = "06/08/04"; $obj = DateTime::createFromFormat( '!d/m/y', $date )->format( DateTime::ISO8601 ); ?>]]></example> -<break/> - <blurb>Parsing strings with the ~date_parse_from_format()~ function:</blurb> + <blurb>Parsing with the ~date_parse_from_format()~ function:</blurb> <example result="0"><![CDATA[<?php $date = "06/08/04"; print_r( date_parse_from_format( '!y*d*m', $date ) ); ?>]]></example> -<break/> <blurb>Example:</blurb> <blurb class='pre'> Pattern String Y M D</blurb> diff --git a/slides/time/date-parse-from-format3.xml b/slides/time/date-parse-from-format3.xml index 6735a01..e70c628 100644 --- a/slides/time/date-parse-from-format3.xml +++ b/slides/time/date-parse-from-format3.xml @@ -8,7 +8,7 @@ </div> <div effect="fade-in-out"> <blurb class="xlarge" align="center">|cc0000|08|/|00cc00|03|/|0000cc|10|</blurb> - <blurb class="xlarge" align="center">|cc0000|August| |00cc00|3rd|, |0000cc|2010|</blurb> + <blurb class="xlarge" align="center">|cc0000|Aug| |00cc00|3rd|, |0000cc|2010|</blurb> <blurb align="center">(default)</blurb> </div> <div effect="fade-in-out"> diff --git a/slides/time/date-parse2.xml b/slides/time/date-parse2.xml index d3a79c5..9b18cf1 100644 --- a/slides/time/date-parse2.xml +++ b/slides/time/date-parse2.xml @@ -1,12 +1,12 @@ <?xml version="1.0" encoding="ISO-8859-1"?> <slide> - <title>Parsing Dates</title> + <title>Parsing Dates</title> <div> - <blurb class='large' align='center'>"|a4000000|22||3464a4|apr||f57900|2006| |ad7fa8|8|:|ef2929|36|:|73d216|14| # |c4a000|Europe/Oslo| |75507b|CEST|"</blurb> + <blurb align='center'>"|a4000000|22||3464a4|apr||f57900|2006| |ad7fa8|8|:|ef2929|36|:|73d216|14| # |c4a000|Europe/Oslo| |75507b|CEST|"</blurb> <blurb>Parsing strings with the ~date_parse()~ function:</blurb> - <example result="1"><![CDATA[<?php + <example result="1"><![CDATA[<?php $date = "22apr2006 8:36:14.43 # Europe/Oslo CEST"; $t = date_parse( $date ); @@ -15,14 +15,14 @@ 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"; + 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> + echo "Errors:\n"; + foreach( $t['errors'] as $pos => $message ) + echo "- $message @$pos\n";]]></example> </div> - + </slide> diff --git a/slides/time/date-timezone.xml b/slides/time/date-timezone.xml index 51ab440..a48a1fc 100644 --- a/slides/time/date-timezone.xml +++ b/slides/time/date-timezone.xml @@ -1,20 +1,19 @@ <?xml version="1.0" encoding="ISO-8859-1"?> <slide> - <title>Using Timezones</title> - <subtitle>Changing timezones</subtitle> + <title>Updating the Timezone</title> - <blurb>Using the timezone when parsing a string with a date representation:</blurb> - <example result="1"><![CDATA[<?php - $tz1 = new DateTimeZone("Pacific/Honolulu"); - $tz2 = new DateTimeZone("Australia/Melbourne"); + <blurb>Using the timezone when parsing a string with a date representation:</blurb> + <example result="1"><![CDATA[<?php + $tz1 = new DateTimeZone("Pacific/Honolulu"); + $tz2 = new DateTimeZone("Australia/Melbourne"); - $ts = new DateTime("1978-12-22 09:15", $tz1); - echo $ts->getTimezone()->getName(), ': ', - $ts->format(DateTime::RFC2822), "<br/>"; + $ts = new DateTime("1978-12-22 09:15", $tz1); + echo $ts->getTimezone()->getName(), ': ', + $ts->format(DateTime::RFC2822), "<br/>"; - $ts->setTimezone($tz2); + $ts->setTimezone($tz2); - echo $ts->getTimezone()->getName(), ': ', - $ts->format(DateTime::RFC2822), "<br/>"; + echo $ts->getTimezone()->getName(), ': ', + $ts->format(DateTime::RFC2822), "<br/>"; ?>]]></example> </slide> diff --git a/slides/time/improvements-timezones.xml b/slides/time/improvements-timezones.xml index c16d891..4366fd3 100644 --- a/slides/time/improvements-timezones.xml +++ b/slides/time/improvements-timezones.xml @@ -3,7 +3,7 @@ <title>Timezone Support</title> <list> - <bullet>Bundled timezone database with 576 zones</bullet> + <bullet>Bundled timezone database with more than 500 zones</bullet> <bullet>Not dependent on timezone abbreviations</bullet> <bullet>Timezones have the format: Continent/Location or Continent/Location/Sublocation - Like: Europe/Amsterdam, America/Indiana/Knox</bullet> </list> diff --git a/slides/time/intervals-2.xml b/slides/time/intervals-2.xml index d9a902b..5fbe3b7 100644 --- a/slides/time/intervals-2.xml +++ b/slides/time/intervals-2.xml @@ -1,23 +1,21 @@ <?xml version="1.0" encoding="ISO-8859-1"?> <slide> <title>Intervals</title> - <subtitle>Applying an interval</subtitle> + <blurb>Applying an interval</blurb> <example result="0"><![CDATA[<?php -$d = new DateTime( 'Aug 27th, 2009' ); +$d = new DateTime( 'Aug 28th, 2009' ); echo $d->format( "l Y-m-d\n" ); $i = DateInterval::createFromDateString( "next weekday" ); echo $d->add( $i )->format( "l Y-m-d\n" ); -echo $d->add( $i )->format( "l Y-m-d\n" ); $i = DateInterval::createFromDateString( "3 months 10 days" ); echo $d->sub( $i )->format( "l Y-m-d\n" ); ?>]]></example> <blurb>Result:</blurb> - <blurb class='pre'> Thursday 2009-08-27</blurb> - <blurb effect="fade-in" class='pre'> Friday 2009-08-28</blurb> + <blurb class='pre'> Friday 2009-08-28</blurb> <blurb effect="fade-in" class='pre'> Monday 2009-08-31</blurb> <blurb effect="fade-in" class='pre'> Thursday 2009-05-21</blurb> diff --git a/slides/time/intervals.xml b/slides/time/intervals.xml index c84c7a9..179aae0 100644 --- a/slides/time/intervals.xml +++ b/slides/time/intervals.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="ISO-8859-1"?> <slide> <title>Intervals</title> - <subtitle>Creating an interval</subtitle> + <blurb>Creating an interval:</blurb> <example result="1"><![CDATA[<?php // full notation @@ -12,7 +12,7 @@ $i = new DateInterval( 'P3DT6H' ); // from a difference $d1 = new DateTime(); -$d2 = new DateTime( "2012-05-29 15:26 Europe/Amsterdam" ); +$d2 = new DateTime( "2013-08-13 19:30 Europe/London" ); $i = $d1->diff( $d2 ); // displaying the difference diff --git a/slides/time/problems-condensed.xml b/slides/time/problems-condensed.xml index 32f9ca1..3c57dc9 100644 --- a/slides/time/problems-condensed.xml +++ b/slides/time/problems-condensed.xml @@ -1,7 +1,6 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> +<?xml version="1.0" encoding="utf-8"?> <slide> - <title>Problems</title> - <subtitle>Timezones</subtitle> + <title>Timezones … ‽</title> <image align="center" filename="zones.png" pdf-scale="0.7" /> diff --git a/slides/time/relative-month.xml b/slides/time/relative-month.xml index 56c16dd..957b6a2 100644 --- a/slides/time/relative-month.xml +++ b/slides/time/relative-month.xml @@ -4,8 +4,8 @@ <subtitle>"previous month" / "next month"</subtitle> <example result="1"><![CDATA[<?php - $date = new DateTime( '2010-01-31 15:48:21' ); - echo $date->modify( 'next month' )->format( 'Y-m-d' ), "\n"; + $date = new DateTime( '2010-01-31 15:48:21' ); + echo $date->modify( 'next month' )->format( 'Y-m-d' ), "\n"; ?>]]></example> <break/> diff --git a/slides/time/relative-month3.xml b/slides/time/relative-month3.xml index b8f3764..49c1c1c 100644 --- a/slides/time/relative-month3.xml +++ b/slides/time/relative-month3.xml @@ -4,8 +4,8 @@ <subtitle>"first day *of* next month"</subtitle> <example result="1"><![CDATA[<?php - $date = new DateTime( '2010-01-31 15:48:21' ); - echo $date->modify( 'first day of next month' )->format( 'Y-m-d' ), "\n"; + $date = new DateTime( '2010-01-31 15:48:21' ); + echo $date->modify( 'first day of next month' )->format( 'Y-m-d' ), "\n"; ?>]]></example> <break/> diff --git a/slides/time/timestamps-suck.xml b/slides/time/timestamps-suck.xml index 8bd77e0..68feb59 100644 --- a/slides/time/timestamps-suck.xml +++ b/slides/time/timestamps-suck.xml @@ -3,18 +3,17 @@ <title>Unix timestamps and timezones</title> <example result="1"><![CDATA[<?php - $date = strtotime( '2010-03-07 20:48:21 America/Toronto' ); - echo date( 'Y-m-d', $date ), "\n"; + $date = strtotime( '2010-03-07 20:48:21 America/Toronto' ); + echo date( 'Y-m-d', $date ), "\n"; ?>]]></example> -<break/> <div effect="hide"> <blurb>Explanation:</blurb> - <blurb class='pre'>$date = strtotime( '2010-03-07 20:48:21 America/Toronto' );</blurb> - <blurb effect="fade-in" class='pre'>$date = |ef2929|1268012901|; // string is turned into a number</blurb> - <blurb effect="fade-in" class='pre'>echo date( 'Y-m-d', 1268012901 ), "\n";</blurb> - <blurb effect="fade-in">Number is converted to a date/time string using the *default* timezone:</blurb> - <blurb effect="fade-in" class='pre'>"2010-03-08" |555753|(01:48:21 Europe/London)|</blurb> + <blurb >%$d = strtotime('2010-03-07 20:48 America/Toronto');%</blurb> + <blurb effect="fade-in">%$d = |ef2929|1268012901|; // string is turned into a number%</blurb> + <blurb effect="fade-in">%echo date('Y-m-d', 1268012901), "\n";%</blurb> + <blurb effect="fade-in">Number is converted to a date/time string using the *default* timezone:<br/> + %"2010-03-08" |555753|(01:48:21 Europe/London)|%</blurb> </div> </slide> diff --git a/slides/time/timezone-object-1.xml b/slides/time/timezone-object-1.xml index a8a2814..6576b41 100644 --- a/slides/time/timezone-object-1.xml +++ b/slides/time/timezone-object-1.xml @@ -1,25 +1,22 @@ <?xml version="1.0" encoding="ISO-8859-1"?> <slide> - <title>Using Timezones</title> - <subtitle>The Timezone Object</subtitle> + <title>Using Timezones</title> - <blurb>Creating a timezone resource:</blurb> - <example><![CDATA[<?php - $tz = new DateTimeZone("Asia/Singapore"); + <blurb>Creating a timezone resource:</blurb> + <example><![CDATA[<?php + $tz = new DateTimeZone("Asia/Singapore"); ?>]]></example> -<break/> - <blurb>Using the timezone when parsing a string with a date representation:</blurb> - <example><![CDATA[<?php - $tz = new DateTimeZone("Pacific/Honolulu"); - $ts = new DateTime("1978-12-22 09:15", $tz); + <blurb>Using the timezone when parsing a string:</blurb> + <example><![CDATA[<?php + $tz = new DateTimeZone("Pacific/Honolulu"); + $ts = new DateTime("1978-12-22 09:15", $tz); ?>]]></example> -<break/> - <blurb>A passed timezone object does not override a *parsed* timezone:</blurb> - <example result="1"><![CDATA[<?php - $tz = new DateTimeZone("Pacific/Honolulu"); - $ts2 = new DateTime("1978-12-22 09:15 Europe/London", $tz); - echo $ts2->format( DateTime::RFC2822 ); + <blurb>A passed timezone does not override a *parsed* timezone:</blurb> + <example result="1"><![CDATA[<?php + $tz = new DateTimeZone("Pacific/Honolulu"); + $ts2 = new DateTime("1978-12-22 09:15 Europe/London", $tz); + echo $ts2->format( DateTime::RFC2822 ); ?>]]></example> </slide> diff --git a/slides/time/timezone-utilities-3.xml b/slides/time/timezone-utilities-3.xml index f1b4c59..cc048d6 100644 --- a/slides/time/timezone-utilities-3.xml +++ b/slides/time/timezone-utilities-3.xml @@ -1,18 +1,18 @@ <?xml version="1.0" encoding="ISO-8859-1"?> <slide> - <title>Timezones Utilities</title> - <subtitle>Restricting listing by geographical location</subtitle> + <title>Timezones Utilities</title> + <subtitle>Restricting listing by geographical location</subtitle> - <blurb>Restrict by continent:</blurb> - <example result="1"><![CDATA[<?php - $ids = timezone_identifiers_list( DateTimeZone::EUROPE ); - echo implode( ", ", $ids ); + <blurb>Restrict by continent:</blurb> + <example result="1"><![CDATA[<?php + $ids = timezone_identifiers_list( DateTimeZone::EUROPE ); + echo implode( ", ", $ids ); ?>]]></example> <break/> - <blurb>Restrict by country:</blurb> - <example result="1"><![CDATA[<?php - $ids = timezone_identifiers_list( DateTimeZone::PER_COUNTRY, 'US' ); - echo implode( ", ", $ids ); + <blurb>Restrict by country:</blurb> + <example result="1"><![CDATA[<?php + $ids = timezone_identifiers_list( DateTimeZone::PER_COUNTRY, 'US' ); + echo implode( ", ", $ids ); ?>]]></example> </slide> diff --git a/slides/xdebug/why-debugger3.xml b/slides/xdebug/why-debugger3.xml index 124d43c..02e444d 100644 --- a/slides/xdebug/why-debugger3.xml +++ b/slides/xdebug/why-debugger3.xml @@ -4,9 +4,8 @@ <image filename="xdebug-logo.png" pdf-scale="0.6"/> <list> <bullet>*Xdebug*: An Open Source debugging tool</bullet> - <bullet>About 10 years old</bullet> <bullet>Works on "every" operating system</bullet> - <bullet>PHP 5.1, 5.2, 5.3, 5.4 and trunk</bullet> - <bullet>Version 2.2.2 is the latest</bullet> + <bullet>PHP 5.1, 5.2, 5.3, 5.4 and 5.5</bullet> + <bullet>Version 2.2.3 is the latest</bullet> </list> </slide> diff --git a/time-lonestar13.xml b/time-lonestar13.xml index a7cc409..631cc64 100644 --- a/time-lonestar13.xml +++ b/time-lonestar13.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> -<presentation css="10gen.css"> +<presentation css="10gen-strict.css"> <topic>Localization and Internationalization</topic> -<title>Advanced Date/Time Handling</title> +<title>Date/Time Handling</title> <event>Lonestar PHP</event> <location>Addison, TX, USE</location> <date>June 29th, 2013</date>
« previous php.pres (#1899) next »