Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
floodlight
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
croft1
floodlight
Commits
7d3fe254
Commit
7d3fe254
authored
12 years ago
by
kwang-bsn
Browse files
Options
Downloads
Patches
Plain Diff
BSC-3132 Adjust the date time format
parent
ee7e37e4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/net/floodlightcontroller/core/RoleInfo.java
+7
-1
7 additions, 1 deletion
src/main/java/net/floodlightcontroller/core/RoleInfo.java
src/main/java/net/floodlightcontroller/core/internal/Controller.java
+1
-1
1 addition, 1 deletion
...va/net/floodlightcontroller/core/internal/Controller.java
with
8 additions
and
2 deletions
src/main/java/net/floodlightcontroller/core/RoleInfo.java
+
7
−
1
View file @
7d3fe254
...
...
@@ -16,7 +16,9 @@
package
net.floodlightcontroller.core
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.TimeZone
;
import
net.floodlightcontroller.core.IFloodlightProviderService.Role
;
...
...
@@ -64,7 +66,11 @@ public class RoleInfo {
}
@JsonProperty
(
value
=
"change-date-time"
)
public
String
getRoleChangeDateTime
()
{
return
roleChangeDateTime
==
null
?
""
:
roleChangeDateTime
.
toString
();
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"
);
formatter
.
setTimeZone
(
TimeZone
.
getTimeZone
(
"UTC"
));
return
roleChangeDateTime
==
null
?
""
:
formatter
.
format
(
roleChangeDateTime
);
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/main/java/net/floodlightcontroller/core/internal/Controller.java
+
1
−
1
View file @
7d3fe254
...
...
@@ -184,7 +184,7 @@ public class Controller implements IFloodlightProviderService,
// The current role of the controller.
// If the controller isn't configured to support roles, then this is null.
protected
Role
role
;
protected
String
lastRoleChangeDescription
=
"
Inital role set during
startup."
;
protected
String
lastRoleChangeDescription
=
"
Controller
startup."
;
protected
Date
roleChangeDateTime
=
new
Date
();
// This is the role of the controller based on HARoleChange notifications
// we have sent. I.e., this field reflects the last role notification
...
...
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