Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alecs_myu
erp5
Commits
b69c896d
Commit
b69c896d
authored
Dec 03, 2018
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_web_monitoring] fixup: fix date timezone when UTC ofset is not set
parent
cce22cdb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
7 deletions
+13
-7
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_officejs_jio_promise_view_js.js
...em/web_page_module/gadget_officejs_jio_promise_view_js.js
+11
-5
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_officejs_jio_promise_view_js.xml
...m/web_page_module/gadget_officejs_jio_promise_view_js.xml
+2
-2
No files found.
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_officejs_jio_promise_view_js.js
View file @
b69c896d
...
...
@@ -227,6 +227,13 @@
len
,
start
;
function
addUTCTimezone
(
date_string
)
{
if
(
new
RegExp
(
/
[
+-
][\d]{2}\:?[\d]{2}
$/
).
test
(
date_string
))
{
return
date_string
;
}
return
date_string
+
"
+0000
"
;
}
if
(
status_history
&&
status_history
.
hasOwnProperty
(
'
data
'
))
{
// the status history list is reversed ([old, ...., newest])
len
=
status_history
.
data
.
length
;
...
...
@@ -264,9 +271,8 @@
editable
:
0
,
hidden
:
0
,
hidden_day_is_last_day
:
0
,
"
default
"
:
(
status_history
.
data
[
i
].
date
||
new
Date
(
status_history
.
data
[
i
][
'
start-date
'
])
.
toUTCString
())
+
"
+0000
"
,
"
default
"
:
addUTCTimezone
(
status_history
.
data
[
i
].
date
||
status_history
.
data
[
i
][
'
start-date
'
]),
key
:
"
start_date
"
,
required
:
0
,
timezone_style
:
1
,
...
...
@@ -284,9 +290,9 @@
editable
:
0
,
hidden
:
0
,
hidden_day_is_last_day
:
0
,
"
default
"
:
(
status_history
.
data
[
i
][
'
change-date
'
]
||
"
default
"
:
addUTCTimezone
(
status_history
.
data
[
i
][
'
change-date
'
]
||
new
Date
(
status_history
.
data
[
i
][
'
change-time
'
]
*
1000
)
.
toUTCString
())
+
"
+0000
"
,
.
toUTCString
()),
key
:
"
change_date
"
,
required
:
0
,
timezone_style
:
1
,
...
...
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_officejs_jio_promise_view_js.xml
View file @
b69c896d
...
...
@@ -250,7 +250,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
971.
57749.10471.7526
</string>
</value>
<value>
<string>
971.
63542.55851.49134
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -268,7 +268,7 @@
</tuple>
<state>
<tuple>
<float>
1543
224382.25
</float>
<float>
1543
572898.71
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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