Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
36d11bf7
Commit
36d11bf7
authored
Jul 08, 2013
by
Leigh B Stoller
Browse files
Bug fix to RenewSlice(); use localtime instead of gmtime.
parent
ad0c8f7a
Changes
1
Hide whitespace changes
Inline
Side-by-side
protogeni/lib/GeniSA.pm.in
View file @
36d11bf7
...
...
@@ -1012,13 +1012,16 @@ sub RenewSlice($)
$
message
=
"Expiration is in the past"
;
goto
bad
;
}
if
($
when
<
time
gm
(
strptime
(
$
slice
->
expires
()
)
)
)
{
if
($
when
<
time
local
(
strptime
($
slice
->
expires
()
))
)
{
$
message
=
"Cannot shorten slice lifetime"
;
goto
bad
;
}
if
($
slice
->
Lock
()
!= 0) {
return
GeniResponse
->
BusyResponse
(
"slice"
);
}
print
STDERR
"Changing expiration for $slice from "
.
$
slice
->
expires
()
.
" to $expires
\n
"
;
if
($
slice
->
SetExpiration
($
when
)
!= 0) {
$
message
=
"Could not set expiration time"
;
$
slice
->
UnLock
();
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment