From 2309d53f52f25efe00f2195a58c448506a2605ab Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Mon, 13 Mar 2017 17:52:28 +0500 Subject: - Add timezone field to User and Server model - Pass Velocity DateTool to templates - Adjusted templates to use timezone --- templates/mail/alarm.vm | 2 +- templates/mail/commandResult.vm | 2 +- templates/mail/deviceMoving.vm | 2 +- templates/mail/deviceOffline.vm | 2 +- templates/mail/deviceOnline.vm | 2 +- templates/mail/deviceOverspeed.vm | 2 +- templates/mail/deviceStopped.vm | 2 +- templates/mail/deviceUnknown.vm | 2 +- templates/mail/geofenceEnter.vm | 2 +- templates/mail/geofenceExit.vm | 2 +- templates/mail/ignitionOff.vm | 2 +- templates/mail/ignitionOn.vm | 2 +- templates/mail/maintenance.vm | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) (limited to 'templates/mail') diff --git a/templates/mail/alarm.vm b/templates/mail/alarm.vm index b64b2126a..253c0b7a3 100644 --- a/templates/mail/alarm.vm +++ b/templates/mail/alarm.vm @@ -4,7 +4,7 @@ Device: $device.name
Alarm: $position.getString("alarm")
-Time: $event.serverTime
+Time: $dateTool.format("YYYY.MM.dd HH:mm:ss", $event.serverTime, $locale, $timezone)
Point: #{if}($position.address)$position.address#{else}$position.latitude°, $position.longitude°#{end}
diff --git a/templates/mail/commandResult.vm b/templates/mail/commandResult.vm index 4c330584d..3d2a7ceb8 100644 --- a/templates/mail/commandResult.vm +++ b/templates/mail/commandResult.vm @@ -4,7 +4,7 @@ Device: $device.name
Result: $position.getString("result")
-Time: $event.serverTime
+Time: $dateTool.format("YYYY.MM.dd HH:mm:ss", $event.serverTime, $locale, $timezone)
Link: $webUrl?eventId=$event.id diff --git a/templates/mail/deviceMoving.vm b/templates/mail/deviceMoving.vm index 9ad2d8bdc..a734e59b4 100644 --- a/templates/mail/deviceMoving.vm +++ b/templates/mail/deviceMoving.vm @@ -4,7 +4,7 @@ Device: $device.name
Moving
-Time: $event.serverTime
+Time: $dateTool.format("YYYY.MM.dd HH:mm:ss", $event.serverTime, $locale, $timezone)
Point: #{if}($position.address)$position.address#{else}$position.latitude°, $position.longitude°#{end}
diff --git a/templates/mail/deviceOffline.vm b/templates/mail/deviceOffline.vm index ee7e96f05..d77f4e6a9 100644 --- a/templates/mail/deviceOffline.vm +++ b/templates/mail/deviceOffline.vm @@ -4,7 +4,7 @@ Device: $device.name
Offline
-Time: $event.serverTime
+Time: $dateTool.format("YYYY.MM.dd HH:mm:ss", $event.serverTime, $locale, $timezone)
Link: $webUrl?eventId=$event.id diff --git a/templates/mail/deviceOnline.vm b/templates/mail/deviceOnline.vm index 379b5cc80..9ea65c843 100644 --- a/templates/mail/deviceOnline.vm +++ b/templates/mail/deviceOnline.vm @@ -4,7 +4,7 @@ Device: $device.name
Online
-Time: $event.serverTime
+Time: $dateTool.format("YYYY.MM.dd HH:mm:ss", $event.serverTime, $locale, $timezone)
Link: $webUrl?eventId=$event.id diff --git a/templates/mail/deviceOverspeed.vm b/templates/mail/deviceOverspeed.vm index a8a58a181..1836dacd5 100644 --- a/templates/mail/deviceOverspeed.vm +++ b/templates/mail/deviceOverspeed.vm @@ -11,7 +11,7 @@ Device: $device.name
Exceeds the speed: $speedString
-Time: $event.serverTime
+Time: $dateTool.format("YYYY.MM.dd HH:mm:ss", $event.serverTime, $locale, $timezone)
Point: #{if}($position.address)$position.address#{else}$position.latitude°, $position.longitude°#{end}
diff --git a/templates/mail/deviceStopped.vm b/templates/mail/deviceStopped.vm index 273e1c988..45f97e463 100644 --- a/templates/mail/deviceStopped.vm +++ b/templates/mail/deviceStopped.vm @@ -4,7 +4,7 @@ Device: $device.name
Stopped
-Time: $event.serverTime
+Time: $dateTool.format("YYYY.MM.dd HH:mm:ss", $event.serverTime, $locale, $timezone)
Point: #{if}($position.address)$position.address#{else}$position.latitude°, $position.longitude°#{end}
diff --git a/templates/mail/deviceUnknown.vm b/templates/mail/deviceUnknown.vm index 40b8fbfa7..73696bc47 100644 --- a/templates/mail/deviceUnknown.vm +++ b/templates/mail/deviceUnknown.vm @@ -4,7 +4,7 @@ Device: $device.name
Status is unknown
-Time: $event.serverTime
+Time: $dateTool.format("YYYY.MM.dd HH:mm:ss", $event.serverTime, $locale, $timezone)
Link: $webUrl?eventId=$event.id diff --git a/templates/mail/geofenceEnter.vm b/templates/mail/geofenceEnter.vm index 75d16617f..f0f84fb67 100644 --- a/templates/mail/geofenceEnter.vm +++ b/templates/mail/geofenceEnter.vm @@ -4,7 +4,7 @@ Device: $device.name
Has entered geofence: $geofence.name
-Time: $event.serverTime
+Time: $dateTool.format("YYYY.MM.dd HH:mm:ss", $event.serverTime, $locale, $timezone)
Point: #{if}($position.address)$position.address#{else}$position.latitude°, $position.longitude°#{end}
diff --git a/templates/mail/geofenceExit.vm b/templates/mail/geofenceExit.vm index 6d4d1639d..90e61b618 100644 --- a/templates/mail/geofenceExit.vm +++ b/templates/mail/geofenceExit.vm @@ -4,7 +4,7 @@ Device: $device.name
Has exited geofence: $geofence.name
-Time: $event.serverTime
+Time: $dateTool.format("YYYY.MM.dd HH:mm:ss", $event.serverTime, $locale, $timezone)
Point: #{if}($position.address)$position.address#{else}$position.latitude°, $position.longitude°#{end}
diff --git a/templates/mail/ignitionOff.vm b/templates/mail/ignitionOff.vm index 3a3212b12..407577640 100644 --- a/templates/mail/ignitionOff.vm +++ b/templates/mail/ignitionOff.vm @@ -4,7 +4,7 @@ Device: $device.name
Ignition OFF
-Time: $event.serverTime
+Time: $dateTool.format("YYYY.MM.dd HH:mm:ss", $event.serverTime, $locale, $timezone)
Point: #{if}($position.address)$position.address#{else}$position.latitude°, $position.longitude°#{end}
diff --git a/templates/mail/ignitionOn.vm b/templates/mail/ignitionOn.vm index bbe6c40f6..ad039a849 100644 --- a/templates/mail/ignitionOn.vm +++ b/templates/mail/ignitionOn.vm @@ -4,7 +4,7 @@ Device: $device.name
Ignition ON
-Time: $event.serverTime
+Time: $dateTool.format("YYYY.MM.dd HH:mm:ss", $event.serverTime, $locale, $timezone)
Point: #{if}($position.address)$position.address#{else}$position.latitude°, $position.longitude°#{end}
diff --git a/templates/mail/maintenance.vm b/templates/mail/maintenance.vm index c94c35cc4..2951fdfda 100644 --- a/templates/mail/maintenance.vm +++ b/templates/mail/maintenance.vm @@ -4,7 +4,7 @@ Device: $device.name
Maintenance is required
-Time: $event.serverTime
+Time: $dateTool.format("YYYY.MM.dd HH:mm:ss", $event.serverTime, $locale, $timezone)
Point: #{if}($position.address)$position.address#{else}$position.latitude°, $position.longitude°#{end}
-- cgit v1.2.3