This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
foreach (['EST', 'EDT', 'CST', 'CDT', 'PST', 'PDT'] as $tz) { | |
echo "---- TZ: $tz ---- \n"; | |
$now = new DateTime('@' . (new DateTime('11:30 AM EST'))->getTimeStamp()); | |
$earlier = new DateTime('7 AM', new DateTimeZone($tz)); | |
echo $now->format('r') . "\n"; | |
echo $earlier->format('r') . "\n"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
update piratees p | |
join ( | |
select p1.id, min(ps.ship_in) as ship_in | |
from piratees p1 | |
join piratee_login ps on ps.piratee_id = p1.id | |
where ps.ship_in is not null | |
and ps.ship_in > '1970-01-01 00:00:01' | |
group by p1.id | |
) as ps | |
on ps.id = p.id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
update piratees p | |
join ( | |
select p1.id, min(ps.ship_in) as ship_in | |
from piratees p1 | |
join piratee_login ps on ps.piratee_id = p1.id | |
where ps.ship_in is not null | |
and ps.ship_in != '0000-00-00 00:00:00' | |
group by p1.id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+----+---------------------+---------------+------------+--------------+---------+----+---------------------+ | |
| id | created_date | modified_date | start_date | fname | lname | id | ship_in | | |
+----+---------------------+---------------+------------+--------------+---------+----+---------------------+ | |
| 1 | 0000-00-00 00:00:00 | NULL | 0000-00-00 | Captain Jack | Sparrow | 1 | 2016-03-22 01:15:07 | | |
| 2 | 0000-00-00 00:00:00 | NULL | 0000-00-00 | Captain | Barbosa | 2 | 2016-03-22 01:15:17 | | |
+----+---------------------+---------------+------------+--------------+---------+----+---------------------+ | |
2 rows in set, 1 warning (0.00 sec) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select * -- please don't ever do * | |
from piratees p | |
join ( | |
select p1.id, min(ps.ship_in) as ship_in | |
from piratees p1 | |
join piratee_login ps on ps.piratee_id = p1.id | |
where ps.ship_in is not null | |
and ps.ship_in != '0000-00-00 00:00:00' | |
group by p1.id | |
) as ps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+----+---------------------+---------------+------------+--------------+---------+----+---------------------+---------------------+------------+---------------------+---------------------+ | |
| id | created_date | modified_date | start_date | fname | lname | id | created_date | modified_date | piratee_id | ship_in | ship_out | | |
+----+---------------------+---------------+------------+--------------+---------+----+---------------------+---------------------+------------+---------------------+---------------------+ | |
| 1 | 0000-00-00 00:00:00 | NULL | 0000-00-00 | Captain Jack | Sparrow | 1 | 2016-03-22 01:14:53 | 2016-03-22 01:14:53 | 1 | 0000-00-00 00:00:00 | 2016-03-22 01:14:53 | | |
| 1 | 0000-00-00 00:00:00 | NULL | 0000-00-00 | Captain Jack | Sparrow | 2 | 2016-03-22 01:15:07 | 2016-03-22 01:15:07 | 1 | 2016-03-22 01:15:07 | 2016-03-22 01:15:07 | | |
| 2 | 0000-00-00 00:00:00 | NULL | 0000-00-00 | Captain | Barbos |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NO_AUTO_VALUE_ON_ZERO,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- MySQL dump 10.13 Distrib 5.6.28, for Linux (x86_64) | |
-- | |
-- Host: localhost Database: caribbean | |
-- ------------------------------------------------------ | |
-- Server version 5.6.28 | |
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; | |
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; | |
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; | |
/*!40101 SET NAMES utf8 */; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
------------------ | |
System Information | |
------------------ | |
Time of this report: 1/25/2013, 16:51:06 | |
Operating System: Windows 7 Professional 64-bit (6.1, Build 7601) Service Pack 1 (7601.win7sp1_gdr.120830-0333) | |
Language: English (Regional Setting: English) | |
System Manufacturer: CLEVO CO. | |
System Model: W35_37ET | |
BIOS: BIOS Date: 10/26/12 14:53:27 Ver: 04.06.05 | |
Processor: Intel(R) Core(TM) i7-3630QM CPU @ 2.40GHz (8 CPUs), ~2.4GHz |
NewerOlder