Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
simplesamlphp
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Perun
Perun ProxyIdP
v1
simplesamlphp
Commits
0b4413ac
Commit
0b4413ac
authored
9 years ago
by
Jaime Perez Crespo
Browse files
Options
Downloads
Patches
Plain Diff
Bugfix: do not set the timezone as initialized if it wasn't!
parent
84371887
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/SimpleSAML/Utils/Time.php
+11
-5
11 additions, 5 deletions
lib/SimpleSAML/Utils/Time.php
with
11 additions
and
5 deletions
lib/SimpleSAML/Utils/Time.php
+
11
−
5
View file @
0b4413ac
...
...
@@ -13,6 +13,14 @@ use SimpleSAML\Logger;
class
Time
{
/**
* Whether the timezone has been initialized or not.
*
* @var bool
*/
private
static
$tz_initialized
=
false
;
/**
* This function generates a timestamp on the form used by the SAML protocols.
*
...
...
@@ -39,14 +47,10 @@ class Time
*/
public
static
function
initTimezone
()
{
static
$initialized
=
false
;
if
(
$initialized
)
{
if
(
self
::
$tz_initialized
)
{
return
;
}
$initialized
=
true
;
$globalConfig
=
\SimpleSAML_Configuration
::
getInstance
();
$timezone
=
$globalConfig
->
getString
(
'timezone'
,
null
);
...
...
@@ -54,6 +58,7 @@ class Time
if
(
!
date_default_timezone_set
(
$timezone
))
{
throw
new
\SimpleSAML_Error_Exception
(
'Invalid timezone set in the "timezone" option in config.php.'
);
}
self
::
$tz_initialized
=
true
;
return
;
}
// we don't have a timezone configured
...
...
@@ -64,6 +69,7 @@ class Time
// set the timezone to the default
date_default_timezone_set
(
$serverTimezone
);
self
::
$tz_initialized
=
true
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment