mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Updating datetime format of events to include the timezone
This commit is contained in:
parent
ee13e19a03
commit
bf967eb622
@ -193,7 +193,7 @@ public class ActionEventUtils {
|
||||
eventDescription.put("entityuuid", entityUuid);
|
||||
eventDescription.put("description", description);
|
||||
|
||||
String eventDate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
|
||||
String eventDate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z").format(new Date());
|
||||
eventDescription.put("eventDateTime", eventDate);
|
||||
|
||||
event.setDescription(eventDescription);
|
||||
|
||||
@ -88,7 +88,7 @@ public class AlertGenerator {
|
||||
eventDescription.put("subject", subject);
|
||||
eventDescription.put("body", body);
|
||||
|
||||
String eventDate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
|
||||
String eventDate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z").format(new Date());
|
||||
eventDescription.put("eventDateTime", eventDate);
|
||||
|
||||
event.setDescription(eventDescription);
|
||||
|
||||
@ -151,7 +151,7 @@ public class UsageEventUtils {
|
||||
eventDescription.put("resource", resourceType);
|
||||
eventDescription.put("id", resourceUUID);
|
||||
|
||||
String eventDate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
|
||||
String eventDate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z").format(new Date());
|
||||
eventDescription.put("eventDateTime", eventDate);
|
||||
|
||||
event.setDescription(eventDescription);
|
||||
|
||||
@ -83,7 +83,7 @@ public class NetworkStateListener implements StateListener<State, Event, Network
|
||||
eventDescription.put("old-state", oldState.name());
|
||||
eventDescription.put("new-state", newState.name());
|
||||
|
||||
String eventDate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
|
||||
String eventDate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z").format(new Date());
|
||||
eventDescription.put("eventDateTime", eventDate);
|
||||
|
||||
eventMsg.setDescription(eventDescription);
|
||||
|
||||
@ -77,7 +77,7 @@ public class VolumeStateListener implements StateListener<State, Event, Volume>
|
||||
eventDescription.put("old-state", oldState.name());
|
||||
eventDescription.put("new-state", newState.name());
|
||||
|
||||
String eventDate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
|
||||
String eventDate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z").format(new Date());
|
||||
eventDescription.put("eventDateTime", eventDate);
|
||||
|
||||
eventMsg.setDescription(eventDescription);
|
||||
|
||||
@ -119,7 +119,7 @@ public class UserVmStateListener implements StateListener<State, VirtualMachine.
|
||||
eventDescription.put("old-state", oldState.name());
|
||||
eventDescription.put("new-state", newState.name());
|
||||
|
||||
String eventDate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
|
||||
String eventDate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z").format(new Date());
|
||||
eventDescription.put("eventDateTime", eventDate);
|
||||
|
||||
eventMsg.setDescription(eventDescription);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user