Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
z-push
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Björn Fischer
z-push
Commits
76bb06f7
Commit
76bb06f7
authored
Aug 03, 2017
by
Manfred Kutas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ZP-1235 Improve guessTZNameFromPHPName.
Released under the Affero GNU General Public License (AGPL) version 3.
parent
37417a63
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
9 deletions
+6
-9
timezoneutil.php
src/lib/utils/timezoneutil.php
+6
-9
No files found.
src/lib/utils/timezoneutil.php
View file @
76bb06f7
...
...
@@ -1178,7 +1178,7 @@ class TimezoneUtil {
}
/**
* Tries to find a AS timezone for a php timezone
* Tries to find a AS timezone for a php timezone
.
*
* @param string $phpname a php timezone name
*
...
...
@@ -1188,19 +1188,16 @@ class TimezoneUtil {
static
private
function
guessTZNameFromPHPName
(
$phpname
)
{
foreach
(
self
::
$phptimezones
as
$tzn
=>
$phptzs
)
{
if
(
in_array
(
$phpname
,
$phptzs
))
{
$tzname
=
$tzn
;
if
(
!
is_int
(
$tzn
))
{
return
$tzn
;
}
break
;
}
}
if
(
!
isset
(
$tzname
)
||
is_int
(
$tzname
))
{
ZLog
::
Write
(
LOGLEVEL_ERROR
,
sprintf
(
"TimezoneUtil::guessTZNameFromPHPName() no compatible timezone found for '%s'. Returning 'GMT Standard Time'. Please contact the Z-Push dev team."
,
$phpname
));
return
self
::
$mstzones
[
"085"
][
0
];
}
return
$tzname
;
}
/**
* Returns an AS compatible tz name
*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment