Skip to content

Commit

Permalink
PDOX utility functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
csev committed Feb 8, 2024
1 parent 366b48c commit db0a4db
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 13 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

"nesbot/carbon" : "2.68.1",

"tsugi/lib": "dev-master#7dd1a824432f64bde02dca650d34f57d961062a3",
"tsugi/lib": "dev-master#fb54b517fb1c07f09e250514c6d7c2d441b78177",
"koseu/lib": "dev-master#70c7ac1ca413c2dd541e078ebe07719405621b1b"
},
"config": {
Expand Down
10 changes: 5 additions & 5 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions vendor/composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -7511,12 +7511,12 @@
"source": {
"type": "git",
"url": "https://github.com/tsugiproject/tsugi-php.git",
"reference": "7dd1a824432f64bde02dca650d34f57d961062a3"
"reference": "fb54b517fb1c07f09e250514c6d7c2d441b78177"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/tsugiproject/tsugi-php/zipball/7dd1a824432f64bde02dca650d34f57d961062a3",
"reference": "7dd1a824432f64bde02dca650d34f57d961062a3",
"url": "https://api.github.com/repos/tsugiproject/tsugi-php/zipball/fb54b517fb1c07f09e250514c6d7c2d441b78177",
"reference": "fb54b517fb1c07f09e250514c6d7c2d441b78177",
"shasum": ""
},
"require": {
Expand All @@ -7529,7 +7529,7 @@
"phpunit/php-timer": "v5.0.3",
"phpunit/phpunit": "9.*"
},
"time": "2024-02-04T03:44:31+00:00",
"time": "2024-02-08T19:54:42+00:00",
"default-branch": true,
"type": "library",
"installation-source": "dist",
Expand Down
6 changes: 3 additions & 3 deletions vendor/composer/installed.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
'name' => '__root__',
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => 'c23e353ef9075db97ef40c75ed85ae25f0870e08',
'reference' => '366b48c7466257318acfb56138b2769d9192fb57',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Expand All @@ -13,7 +13,7 @@
'__root__' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => 'c23e353ef9075db97ef40c75ed85ae25f0870e08',
'reference' => '366b48c7466257318acfb56138b2769d9192fb57',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Expand Down Expand Up @@ -1045,7 +1045,7 @@
'tsugi/lib' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => '7dd1a824432f64bde02dca650d34f57d961062a3',
'reference' => 'fb54b517fb1c07f09e250514c6d7c2d441b78177',
'type' => 'library',
'install_path' => __DIR__ . '/../tsugi/lib',
'aliases' => array(
Expand Down
14 changes: 14 additions & 0 deletions vendor/tsugi/lib/src/Util/PDOX.php
Original file line number Diff line number Diff line change
Expand Up @@ -887,4 +887,18 @@ public static function limitVars($sql, $vars) {
return $retval;
}

/**
*
*/
public static function timeFromMySQLTimeStamp(string $datetime) {
return strtotime($datetime);
}

/**
*
*/
public static function timeToMySQLTimeStamp(int $when) {
return date("Y-m-d H:i:s",$when);
}

}

0 comments on commit db0a4db

Please sign in to comment.