Initial commit.

This commit is contained in:
2026-03-10 21:25:26 +08:00
commit 78739bf725
3089 changed files with 472990 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
<?php
// File name: timezone.inc.php
// Description: PHP subroutines to deal with time zone information
// Date: 2004-04-05
// Author: imacat <imacat@pristine.com.tw>
// Copyright: Copyright (C) 2004-2007 Pristine Communications
// timezone_iso: Return the timezone in ISO 8601 format
function timezone_iso()
{
// Cache the result
static $cache;
// Return the cache
if (isset($cache)) {
return $cache;
}
// Calculate the time zone string
$tzsec = date("Z");
$tzsign = ($tzsec >= 0? "+": "-");
$tzsec = abs($tzsec);
$tzmin = floor($tzsec / 60);
$tzsec = $tzsec % 60;
$tzhr = floor($tzmin / 60);
$tzmin = $tzmin % 60;
$tz = sprintf("%s%02d:%02d", $tzsign, $tzhr, $tzmin);
// Cache it
$cache = $tz;
return $tz;
}
?>